Hi,
I have a problem of page redirection. Basically, the user has to connect to
the local web server, but some pages need to be served by a remote server,
because it contains some confidential data that cannot be moved locally
(everything occurs in the company Intranet, however). Since the ASP.NET
application uses extensive Javascript, we cannot make it work because of the
"cross-site" (same origin policy) of Javascript.
Therefore, we thought it would be useful to implement the IHttpHandler and
create a request for all pages that need to be served remotely. The code is
the following:
*************
Public Class AsyncProxyHandl er
Implements IHttpHandler, IRequiresSessio nState
Public Sub ProcessRequest( ByVal context As HttpContext) Implements
IHttpHandler.Pr ocessRequest
Dim url As String = context.Request .RawUrl
url = url.Replace(con text.Request.Ap plicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebR equest.Create(" http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credent ials = CredentialCache .DefaultCredent ials
Try
Dim response As HttpWebResponse =
DirectCast(requ est.GetResponse (), HttpWebResponse )
Dim responseStream As Stream = response.GetRes ponseStream()
Dim output As Stream = context.Respons e.OutputStream
CopyStream(resp onseStream, output)
Catch we As System.Net.WebE xception
End Try
End Sub
Private Sub CopyStream(ByVa l fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fr omStream)
Dim sw As New StreamWriter(to Stream)
sw.WriteLine(sr .ReadToEnd())
sw.Flush()
Catch ex As Exception
End Try
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements
IHttpHandler.Is Reusable
Get
Return True
End Get
End Property
End Class
*************
However, since the same page also contains controls, all the events (button
click events, for instance) are never executed. We also tried we a dummy
application, and everything we can see on the page is the content of the
page included in the request, no other control.
Are we doing something wrong? Is there a better solution to overcome our
problem?
Any help would be appreciated. We are working on this problem for several
days, but we cannot find a solution....
Thanks
Mike 6 3360
Forgot to mention that we are using .NET 1.1
"Mike" <mi**@mike.coms chrieb im Newsbeitrag
news:Op******** ******@TK2MSFTN GP05.phx.gbl...
>
Hi,
I have a problem of page redirection. Basically, the user has to connect
to the local web server, but some pages need to be served by a remote
server, because it contains some confidential data that cannot be moved
locally (everything occurs in the company Intranet, however). Since the
ASP.NET application uses extensive Javascript, we cannot make it work
because of the "cross-site" (same origin policy) of Javascript.
Therefore, we thought it would be useful to implement the IHttpHandler and
create a request for all pages that need to be served remotely. The code
is the following:
*************
Public Class AsyncProxyHandl er
Implements IHttpHandler, IRequiresSessio nState
Public Sub ProcessRequest( ByVal context As HttpContext) Implements
IHttpHandler.Pr ocessRequest
Dim url As String = context.Request .RawUrl
url = url.Replace(con text.Request.Ap plicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebR equest.Create(" http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credent ials = CredentialCache .DefaultCredent ials
Try
Dim response As HttpWebResponse =
DirectCast(requ est.GetResponse (), HttpWebResponse )
Dim responseStream As Stream = response.GetRes ponseStream()
Dim output As Stream = context.Respons e.OutputStream
CopyStream(resp onseStream, output)
Catch we As System.Net.WebE xception
End Try
End Sub
Private Sub CopyStream(ByVa l fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fr omStream)
Dim sw As New StreamWriter(to Stream)
sw.WriteLine(sr .ReadToEnd())
sw.Flush()
Catch ex As Exception
End Try
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements
IHttpHandler.Is Reusable
Get
Return True
End Get
End Property
End Class
*************
However, since the same page also contains controls, all the events
(button click events, for instance) are never executed. We also tried we a
dummy application, and everything we can see on the page is the content of
the page included in the request, no other control.
Are we doing something wrong? Is there a better solution to overcome our
problem?
Any help would be appreciated. We are working on this problem for several
days, but we cannot find a solution....
Thanks
Mike
Why aren't you just using Response.Redire ct?
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <mi**@mike.comw rote in message
news:Op******** ******@TK2MSFTN GP05.phx.gbl...
>
Hi,
I have a problem of page redirection. Basically, the user has to connect
to the local web server, but some pages need to be served by a remote
server, because it contains some confidential data that cannot be moved
locally (everything occurs in the company Intranet, however). Since the
ASP.NET application uses extensive Javascript, we cannot make it work
because of the "cross-site" (same origin policy) of Javascript.
Therefore, we thought it would be useful to implement the IHttpHandler and
create a request for all pages that need to be served remotely. The code
is the following:
*************
Public Class AsyncProxyHandl er
Implements IHttpHandler, IRequiresSessio nState
Public Sub ProcessRequest( ByVal context As HttpContext) Implements
IHttpHandler.Pr ocessRequest
Dim url As String = context.Request .RawUrl
url = url.Replace(con text.Request.Ap plicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebR equest.Create(" http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credent ials = CredentialCache .DefaultCredent ials
Try
Dim response As HttpWebResponse =
DirectCast(requ est.GetResponse (), HttpWebResponse )
Dim responseStream As Stream = response.GetRes ponseStream()
Dim output As Stream = context.Respons e.OutputStream
CopyStream(resp onseStream, output)
Catch we As System.Net.WebE xception
End Try
End Sub
Private Sub CopyStream(ByVa l fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fr omStream)
Dim sw As New StreamWriter(to Stream)
sw.WriteLine(sr .ReadToEnd())
sw.Flush()
Catch ex As Exception
End Try
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements
IHttpHandler.Is Reusable
Get
Return True
End Get
End Property
End Class
*************
However, since the same page also contains controls, all the events
(button click events, for instance) are never executed. We also tried we a
dummy application, and everything we can see on the page is the content of
the page included in the request, no other control.
Are we doing something wrong? Is there a better solution to overcome our
problem?
Any help would be appreciated. We are working on this problem for several
days, but we cannot find a solution....
Thanks
Mike
To avoid the cross-site Javascript security problem, since we have 2 web
server handling the various IFRAMEs.
"Kevin Spencer" wrote:
Why aren't you just using Response.Redire ct?
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <mi**@mike.comw rote in message
news:Op******** ******@TK2MSFTN GP05.phx.gbl...
Hi,
I have a problem of page redirection. Basically, the user has to connect
to the local web server, but some pages need to be served by a remote
server, because it contains some confidential data that cannot be moved
locally (everything occurs in the company Intranet, however). Since the
ASP.NET application uses extensive Javascript, we cannot make it work
because of the "cross-site" (same origin policy) of Javascript.
Therefore, we thought it would be useful to implement the IHttpHandler and
create a request for all pages that need to be served remotely. The code
is the following:
*************
Public Class AsyncProxyHandl er
Implements IHttpHandler, IRequiresSessio nState
Public Sub ProcessRequest( ByVal context As HttpContext) Implements
IHttpHandler.Pr ocessRequest
Dim url As String = context.Request .RawUrl
url = url.Replace(con text.Request.Ap plicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebR equest.Create(" http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credent ials = CredentialCache .DefaultCredent ials
Try
Dim response As HttpWebResponse =
DirectCast(requ est.GetResponse (), HttpWebResponse )
Dim responseStream As Stream = response.GetRes ponseStream()
Dim output As Stream = context.Respons e.OutputStream
CopyStream(resp onseStream, output)
Catch we As System.Net.WebE xception
End Try
End Sub
Private Sub CopyStream(ByVa l fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fr omStream)
Dim sw As New StreamWriter(to Stream)
sw.WriteLine(sr .ReadToEnd())
sw.Flush()
Catch ex As Exception
End Try
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements
IHttpHandler.Is Reusable
Get
Return True
End Get
End Property
End Class
*************
However, since the same page also contains controls, all the events
(button click events, for instance) are never executed. We also tried we a
dummy application, and everything we can see on the page is the content of
the page included in the request, no other control.
Are we doing something wrong? Is there a better solution to overcome our
problem?
Any help would be appreciated. We are working on this problem for several
days, but we cannot find a solution....
Thanks
Mike
I'm not following you. Response.Redire ct does not use JavaScript. It adds a
redirect header instruction to the response.
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <Mi**@discussio ns.microsoft.co mwrote in message
news:F3******** *************** ***********@mic rosoft.com...
>
To avoid the cross-site Javascript security problem, since we have 2 web
server handling the various IFRAMEs.
"Kevin Spencer" wrote:
>Why aren't you just using Response.Redire ct?
-- HTH,
Kevin Spencer Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <mi**@mike.comw rote in message news:Op******* *******@TK2MSFT NGP05.phx.gbl.. .
>
Hi,
I have a problem of page redirection. Basically, the user has to
connect
to the local web server, but some pages need to be served by a remote
server, because it contains some confidential data that cannot be moved
locally (everything occurs in the company Intranet, however). Since the
ASP.NET application uses extensive Javascript, we cannot make it work
because of the "cross-site" (same origin policy) of Javascript.
Therefore, we thought it would be useful to implement the IHttpHandler
and
create a request for all pages that need to be served remotely. The
code
is the following:
*************
Public Class AsyncProxyHandl er
Implements IHttpHandler, IRequiresSessio nState
Public Sub ProcessRequest( ByVal context As HttpContext) Implements
IHttpHandler.Pr ocessRequest
Dim url As String = context.Request .RawUrl
url = url.Replace(con text.Request.Ap plicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebR equest.Create(" http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credent ials = CredentialCache .DefaultCredent ials
Try
Dim response As HttpWebResponse =
DirectCast(requ est.GetResponse (), HttpWebResponse )
Dim responseStream As Stream = response.GetRes ponseStream()
Dim output As Stream = context.Respons e.OutputStream
CopyStream(resp onseStream, output)
Catch we As System.Net.WebE xception
End Try
End Sub
Private Sub CopyStream(ByVa l fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fr omStream)
Dim sw As New StreamWriter(to Stream)
sw.WriteLine(sr .ReadToEnd())
sw.Flush()
Catch ex As Exception
End Try
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements
IHttpHandler.Is Reusable
Get
Return True
End Get
End Property
End Class
*************
However, since the same page also contains controls, all the events
(button click events, for instance) are never executed. We also tried
we a
dummy application, and everything we can see on the page is the content
of
the page included in the request, no other control.
Are we doing something wrong? Is there a better solution to overcome
our
problem?
Any help would be appreciated. We are working on this problem for
several
days, but we cannot find a solution....
Thanks
Mike
Hi Kevin,
Sorry, I was not clear enough on my last answer. The problem we are trying
to avoid is cross-site Javascript, since in the web site we use several
IFRAMEs that are coming from different web servers within our company. We
realized that some Javascript that used to access a parent frame's property,
for instance, could not execute. We always got a "Permission denied"
exception. Therefore, we thought to add an HttpHandler that would retrieve
the content from the remote server. The client would then only receive the
answer from the local server. The code that forwards the POST request is
below.
Do you mean that instead of the HttpWebRequest, we could simply use a
"Response.Redir ect"? Would we be able to execute a Javascript like
"parent.parent. myProperty = true;" from a IFRAME (page) that was redirected
through "Response.Redir ect", or would we run into the cross-site Javascript
problem?
Thanks.
Mike
******
If url.IndexOf("is remote=true") = -1 Then
' The request is forwarded back to the
default server.
request =
DirectCast(WebR equest.Create(r emoteServer + url), HttpWebRequest)
request.Credent ials =
CredentialCache .DefaultCredent ials
ElseIf url.IndexOf("is remote=true") <-1 Then
' Keeps the request to the local server, no
need to re-route it.
url = url.Replace("re directed=true",
String.Empty)
request =
DirectCast(WebR equest.Create(l ocalServer + url), HttpWebRequest)
request.Credent ials =
CredentialCache .DefaultCredent ials
End If
request.Method = "POST"
request.Content Type =
"applicatio n/x-www-form-urlencoded"
Dim RawBytes() As Byte = readRequest(con text)
request.Content Length = RawBytes.Length
Dim newStream As Stream = request.GetRequ estStream()
newStream.Write (RawBytes, 0, RawBytes.Length )
newStream.Close ()
' Create a Response.
Dim myHttpWebRespon se As HttpWebResponse =
CType(request.G etResponse(), HttpWebResponse )
' Get the stream associated with the response.
Dim receiveStream As Stream =
myHttpWebRespon se.GetResponseS tream()
' Pipes the stream to a higher level stream reader
with the required encoding format.
Dim readStream As New StreamReader(re ceiveStream,
Encoding.UTF8)
'Stream the data in a single operation to the
context's response.
context.Respons e.Write(readStr eam.ReadToEnd() )
myHttpWebRespon se.Close()
readStream.Clos e()
*********
"Kevin Spencer" <un**********@n othinks.comschr ieb im Newsbeitrag
news:OO******** ******@TK2MSFTN GP05.phx.gbl...
I'm not following you. Response.Redire ct does not use JavaScript. It adds
a redirect header instruction to the response.
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <Mi**@discussio ns.microsoft.co mwrote in message
news:F3******** *************** ***********@mic rosoft.com...
>> To avoid the cross-site Javascript security problem, since we have 2 web server handling the various IFRAMEs. "Kevin Spencer" wrote:
>>Why aren't you just using Response.Redire ct?
-- HTH,
Kevin Spencer Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <mi**@mike.comw rote in message news:Op****** ********@TK2MSF TNGP05.phx.gbl. ..
Hi,
I have a problem of page redirection. Basically, the user has to connect to the local web server, but some pages need to be served by a remote server, because it contains some confidential data that cannot be moved locally (everything occurs in the company Intranet, however). Since the ASP.NET application uses extensive Javascript, we cannot make it work because of the "cross-site" (same origin policy) of Javascript.
Therefore, we thought it would be useful to implement the IHttpHandler and create a request for all pages that need to be served remotely. The code is the following:
************ * Public Class AsyncProxyHandl er Implements IHttpHandler, IRequiresSessio nState
Public Sub ProcessRequest( ByVal context As HttpContext) Implements IHttpHandler.P rocessRequest
Dim url As String = context.Request .RawUrl url = url.Replace(con text.Request.Ap plicationPath, "") Dim request As HttpWebRequest request = DirectCast(Web Request.Create( "http://localhost/AsyncProxy2/Default.aspx"), HttpWebRequest ) request.Credent ials = CredentialCache .DefaultCredent ials
Try Dim response As HttpWebResponse = DirectCast(req uest.GetRespons e(), HttpWebResponse ) Dim responseStream As Stream = response.GetRes ponseStream() Dim output As Stream = context.Respons e.OutputStream CopyStream(resp onseStream, output)
Catch we As System.Net.WebE xception
End Try
End Sub
Private Sub CopyStream(ByVa l fromStream As Stream, ByVal toStream As Stream) Try Dim sr As New StreamReader(fr omStream) Dim sw As New StreamWriter(to Stream) sw.WriteLine(sr .ReadToEnd()) sw.Flush() Catch ex As Exception End Try End Sub
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.I sReusable
Get Return True End Get
End Property
End Class ************ *
However, since the same page also contains controls, all the events (button click events, for instance) are never executed. We also tried we a dummy application, and everything we can see on the page is the content of the page included in the request, no other control.
Are we doing something wrong? Is there a better solution to overcome our problem?
Any help would be appreciated. We are working on this problem for several days, but we cannot find a solution....
Thanks Mike
Hi Mike,
An IFrame is just a Browser window inside another browser window. So, if you
put an IFrame into a page, and it is an ASPX page that uses
Response.Redire ct on PostBack, there is no JavaScript involved.
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <mi**@mike.comw rote in message
news:Os******** ******@TK2MSFTN GP04.phx.gbl...
>
Hi Kevin,
Sorry, I was not clear enough on my last answer. The problem we are trying
to avoid is cross-site Javascript, since in the web site we use several
IFRAMEs that are coming from different web servers within our company. We
realized that some Javascript that used to access a parent frame's
property, for instance, could not execute. We always got a "Permission
denied" exception. Therefore, we thought to add an HttpHandler that would
retrieve the content from the remote server. The client would then only
receive the answer from the local server. The code that forwards the POST
request is below.
Do you mean that instead of the HttpWebRequest, we could simply use a
"Response.Redir ect"? Would we be able to execute a Javascript like
"parent.parent. myProperty = true;" from a IFRAME (page) that was
redirected through "Response.Redir ect", or would we run into the
cross-site Javascript problem?
Thanks.
Mike
******
If url.IndexOf("is remote=true") = -1 Then
' The request is forwarded back to the
default server.
request =
DirectCast(WebR equest.Create(r emoteServer + url), HttpWebRequest)
request.Credent ials =
CredentialCache .DefaultCredent ials
ElseIf url.IndexOf("is remote=true") <-1 Then
' Keeps the request to the local server, no
need to re-route it.
url = url.Replace("re directed=true",
String.Empty)
request =
DirectCast(WebR equest.Create(l ocalServer + url), HttpWebRequest)
request.Credent ials =
CredentialCache .DefaultCredent ials
End If
request.Method = "POST"
request.Content Type =
"applicatio n/x-www-form-urlencoded"
Dim RawBytes() As Byte = readRequest(con text)
request.Content Length = RawBytes.Length
Dim newStream As Stream =
request.GetRequ estStream()
newStream.Write (RawBytes, 0, RawBytes.Length )
newStream.Close ()
' Create a Response.
Dim myHttpWebRespon se As HttpWebResponse =
CType(request.G etResponse(), HttpWebResponse )
' Get the stream associated with the response.
Dim receiveStream As Stream =
myHttpWebRespon se.GetResponseS tream()
' Pipes the stream to a higher level stream reader
with the required encoding format.
Dim readStream As New StreamReader(re ceiveStream,
Encoding.UTF8)
'Stream the data in a single operation to the
context's response.
context.Respons e.Write(readStr eam.ReadToEnd() )
myHttpWebRespon se.Close()
readStream.Clos e()
*********
"Kevin Spencer" <un**********@n othinks.comschr ieb im Newsbeitrag
news:OO******** ******@TK2MSFTN GP05.phx.gbl...
>I'm not following you. Response.Redire ct does not use JavaScript. It adds a redirect header instruction to the response.
-- HTH,
Kevin Spencer Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <Mi**@discussio ns.microsoft.co mwrote in message news:F3******* *************** ************@mi crosoft.com...
>>> To avoid the cross-site Javascript security problem, since we have 2 web server handling the various IFRAMEs. "Kevin Spencer" wrote:
Why aren't you just using Response.Redire ct?
-- HTH,
Kevin Spencer Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Mike" <mi**@mike.comw rote in message news:Op***** *********@TK2MS FTNGP05.phx.gbl ...
Hi,
I have a problem of page redirection. Basically, the user has to connect to the local web server, but some pages need to be served by a remote server, because it contains some confidential data that cannot be moved locally (everything occurs in the company Intranet, however). Since the ASP.NET application uses extensive Javascript, we cannot make it work because of the "cross-site" (same origin policy) of Javascript.
Therefore, we thought it would be useful to implement the IHttpHandle r and create a request for all pages that need to be served remotely. The code is the following:
*********** ** Public Class AsyncProxyHandl er Implements IHttpHandler, IRequiresSessio nState
Public Sub ProcessRequest( ByVal context As HttpContext) Implements IHttpHandler. ProcessRequest
Dim url As String = context.Request .RawUrl url = url.Replace(con text.Request.Ap plicationPath, "") Dim request As HttpWebRequest request = DirectCast(We bRequest.Create ("http://localhost/AsyncProxy2/Default.aspx"), HttpWebReques t) request.Credent ials = CredentialCache .DefaultCredent ials
Try Dim response As HttpWebResponse = DirectCast(re quest.GetRespon se(), HttpWebResponse ) Dim responseStream As Stream = response.GetR esponseStream() Dim output As Stream = context.Respons e.OutputStream CopyStream(resp onseStream, output)
Catch we As System.Net.WebE xception
End Try
End Sub
Private Sub CopyStream(ByVa l fromStream As Stream, ByVal toStream As Stream) Try Dim sr As New StreamReader(fr omStream) Dim sw As New StreamWriter(to Stream) sw.WriteLine(sr .ReadToEnd()) sw.Flush() Catch ex As Exception End Try End Sub
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler. IsReusable
Get Return True End Get
End Property
End Class *********** **
However, since the same page also contains controls, all the events (button click events, for instance) are never executed. We also tried we a dummy application, and everything we can see on the page is the content of the page included in the request, no other control.
Are we doing something wrong? Is there a better solution to overcome our problem?
Any help would be appreciated. We are working on this problem for several days, but we cannot find a solution....
Thanks Mike
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Hanse Davion |
last post by:
Can anyone provide some insight on what this problem could be? I have
searched the web, read forums, and all the installation documentation for
the dotnetnuke feeware portal from asp.net. I am very confident that all
the security settings have been configured correctly. My setup is a Windows
XP 5.1, MSDE SP3, and VS2003.
-----------------------------
Server Error in '/DotNetNuke' Application....
|
by: Jed |
last post by:
I have written an HttpHandler which I invoke through an ashx page.
The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page.
Everything up to the redirect works fine, but I can't get the redirect to work.
If I do a ...
context.Response.Write("Hello World");
.... the HttpHandler works great and the browser loads the text fine,
but if I change it to ...
|
by: Jeremy Lew |
last post by:
When my HttpHandler is processing a request when installed on a particular
2003 Server machine, the Context.Session object is null. Any idea why this
might be? My handler implements IRequiresSessionState and works normally on
other machines.
Thanks,
Jeremy
|
by: Ralf Müller |
last post by:
hi all!
in my custom HttpHandler HttpContext.Current.Session is not set - why?
greetings, ralf
|
by: Jared Tullis |
last post by:
We have an .NET 1.1 application running on 4 2K3 load balanced servers
(using WLBS). IIS has the .NET aspnet_isapi.dll mapped as a wildcard
application map. The web.config points *.html to a HttpHandler of our
design. This setup serves over a million page views daily with almost no
hassle whatsoever. We have brought a few affiliates onto our system who
have URLs still floating in Google, Y! and other search engines from before
they...
| |
by: Adam |
last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have
developed the handler,
1. installed it into the gac
2. added it to the machine.config:
<httpHandlers>
<add verb="*" path="*.sgf" type="CustomExtensionHandler,
Extenders.CustomExtensionHandler, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=d831d925597c1031" validate="True"/>
</httpHandlers>
|
by: bryan |
last post by:
I've got a custom HttpHandler to process all requests for a given
extension. It gets invoked OK, but if I try to do a Server.Transfer I
get an HttpException. A Response.Redirect works, but I really need to
avoid the extra round-trip to the client.
I've tried Passing the page name, the full URL, and the instance of
the handler class to the Transfer method, but everything gets me the
same error 500.
Any help would be appreciated.
|
by: the4man |
last post by:
Hi all!
I have an app that show images that are stored in SQL Server. To show
the images on screen, until now (with the "old" ASP), I use the
following code:
<img src="showimage.asp?id=20" />
And in "showimage.asp" (more or less, I write from memory)
|
by: zlf |
last post by:
Hello,
I try to use a custom HttpHandler to add something to session, then display
the original page.
public void ProcessRequest(HttpContext context)
{
context.Session = "test";
}
But, a empty page is rendered with this HttpHandler, should I add some
|
by: Author |
last post by:
I followed the example at http://support.microsoft.com/kb/308001/EN-US/
and created my own HttpHandler.
Here is the code:
using System.Web;
namespace MyNameSpace
{
public class SyncHttpHandler: IHttpHandler
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |