473,382 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

HttpHandler


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 AsyncProxyHandler
Implements IHttpHandler, IRequiresSessionState

Public Sub ProcessRequest(ByVal context As HttpContext) Implements
IHttpHandler.ProcessRequest

Dim url As String = context.Request.RawUrl
url = url.Replace(context.Request.ApplicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebRequest.Create("http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credentials = CredentialCache.DefaultCredentials

Try
Dim response As HttpWebResponse =
DirectCast(request.GetResponse(), HttpWebResponse)
Dim responseStream As Stream = response.GetResponseStream()
Dim output As Stream = context.Response.OutputStream
CopyStream(responseStream, output)

Catch we As System.Net.WebException

End Try

End Sub

Private Sub CopyStream(ByVal fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fromStream)
Dim sw As New StreamWriter(toStream)
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

Aug 21 '07 #1
6 3296

Forgot to mention that we are using .NET 1.1

"Mike" <mi**@mike.comschrieb im Newsbeitrag
news:Op**************@TK2MSFTNGP05.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 AsyncProxyHandler
Implements IHttpHandler, IRequiresSessionState

Public Sub ProcessRequest(ByVal context As HttpContext) Implements
IHttpHandler.ProcessRequest

Dim url As String = context.Request.RawUrl
url = url.Replace(context.Request.ApplicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebRequest.Create("http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credentials = CredentialCache.DefaultCredentials

Try
Dim response As HttpWebResponse =
DirectCast(request.GetResponse(), HttpWebResponse)
Dim responseStream As Stream = response.GetResponseStream()
Dim output As Stream = context.Response.OutputStream
CopyStream(responseStream, output)

Catch we As System.Net.WebException

End Try

End Sub

Private Sub CopyStream(ByVal fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fromStream)
Dim sw As New StreamWriter(toStream)
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



Aug 21 '07 #2
Why aren't you just using Response.Redirect?

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Mike" <mi**@mike.comwrote in message
news:Op**************@TK2MSFTNGP05.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 AsyncProxyHandler
Implements IHttpHandler, IRequiresSessionState

Public Sub ProcessRequest(ByVal context As HttpContext) Implements
IHttpHandler.ProcessRequest

Dim url As String = context.Request.RawUrl
url = url.Replace(context.Request.ApplicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebRequest.Create("http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credentials = CredentialCache.DefaultCredentials

Try
Dim response As HttpWebResponse =
DirectCast(request.GetResponse(), HttpWebResponse)
Dim responseStream As Stream = response.GetResponseStream()
Dim output As Stream = context.Response.OutputStream
CopyStream(responseStream, output)

Catch we As System.Net.WebException

End Try

End Sub

Private Sub CopyStream(ByVal fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fromStream)
Dim sw As New StreamWriter(toStream)
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



Aug 22 '07 #3

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.Redirect?

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Mike" <mi**@mike.comwrote in message
news:Op**************@TK2MSFTNGP05.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 AsyncProxyHandler
Implements IHttpHandler, IRequiresSessionState

Public Sub ProcessRequest(ByVal context As HttpContext) Implements
IHttpHandler.ProcessRequest

Dim url As String = context.Request.RawUrl
url = url.Replace(context.Request.ApplicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebRequest.Create("http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credentials = CredentialCache.DefaultCredentials

Try
Dim response As HttpWebResponse =
DirectCast(request.GetResponse(), HttpWebResponse)
Dim responseStream As Stream = response.GetResponseStream()
Dim output As Stream = context.Response.OutputStream
CopyStream(responseStream, output)

Catch we As System.Net.WebException

End Try

End Sub

Private Sub CopyStream(ByVal fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fromStream)
Dim sw As New StreamWriter(toStream)
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



Aug 22 '07 #4
I'm not following you. Response.Redirect 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**@discussions.microsoft.comwrote in message
news:F3**********************************@microsof t.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.Redirect?

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Mike" <mi**@mike.comwrote in message
news:Op**************@TK2MSFTNGP05.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 AsyncProxyHandler
Implements IHttpHandler, IRequiresSessionState

Public Sub ProcessRequest(ByVal context As HttpContext) Implements
IHttpHandler.ProcessRequest

Dim url As String = context.Request.RawUrl
url = url.Replace(context.Request.ApplicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebRequest.Create("http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credentials = CredentialCache.DefaultCredentials

Try
Dim response As HttpWebResponse =
DirectCast(request.GetResponse(), HttpWebResponse)
Dim responseStream As Stream = response.GetResponseStream()
Dim output As Stream = context.Response.OutputStream
CopyStream(responseStream, output)

Catch we As System.Net.WebException

End Try

End Sub

Private Sub CopyStream(ByVal fromStream As Stream, ByVal toStream As
Stream)
Try
Dim sr As New StreamReader(fromStream)
Dim sw As New StreamWriter(toStream)
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





Aug 23 '07 #5

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.Redirect"? Would we be able to execute a Javascript like
"parent.parent.myProperty = true;" from a IFRAME (page) that was redirected
through "Response.Redirect", or would we run into the cross-site Javascript
problem?

Thanks.
Mike
******
If url.IndexOf("isremote=true") = -1 Then
' The request is forwarded back to the
default server.
request =
DirectCast(WebRequest.Create(remoteServer + url), HttpWebRequest)
request.Credentials =
CredentialCache.DefaultCredentials

ElseIf url.IndexOf("isremote=true") <-1 Then
' Keeps the request to the local server, no
need to re-route it.
url = url.Replace("redirected=true",
String.Empty)
request =
DirectCast(WebRequest.Create(localServer + url), HttpWebRequest)
request.Credentials =
CredentialCache.DefaultCredentials
End If
request.Method = "POST"
request.ContentType =
"application/x-www-form-urlencoded"
Dim RawBytes() As Byte = readRequest(context)
request.ContentLength = RawBytes.Length
Dim newStream As Stream = request.GetRequestStream()
newStream.Write(RawBytes, 0, RawBytes.Length)
newStream.Close()

' Create a Response.
Dim myHttpWebResponse As HttpWebResponse =
CType(request.GetResponse(), HttpWebResponse)
' Get the stream associated with the response.
Dim receiveStream As Stream =
myHttpWebResponse.GetResponseStream()
' Pipes the stream to a higher level stream reader
with the required encoding format.
Dim readStream As New StreamReader(receiveStream,
Encoding.UTF8)

'Stream the data in a single operation to the
context's response.
context.Response.Write(readStream.ReadToEnd())
myHttpWebResponse.Close()
readStream.Close()
*********

"Kevin Spencer" <un**********@nothinks.comschrieb im Newsbeitrag
news:OO**************@TK2MSFTNGP05.phx.gbl...
I'm not following you. Response.Redirect 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**@discussions.microsoft.comwrote in message
news:F3**********************************@microsof t.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.Redirect?

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Mike" <mi**@mike.comwrote in message
news:Op**************@TK2MSFTNGP05.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 AsyncProxyHandler
Implements IHttpHandler, IRequiresSessionState

Public Sub ProcessRequest(ByVal context As HttpContext) Implements
IHttpHandler.ProcessRequest

Dim url As String = context.Request.RawUrl
url = url.Replace(context.Request.ApplicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebRequest.Create("http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credentials = CredentialCache.DefaultCredentials

Try
Dim response As HttpWebResponse =
DirectCast(request.GetResponse(), HttpWebResponse)
Dim responseStream As Stream = response.GetResponseStream()
Dim output As Stream = context.Response.OutputStream
CopyStream(responseStream, output)

Catch we As System.Net.WebException

End Try

End Sub

Private Sub CopyStream(ByVal fromStream As Stream, ByVal toStream
As
Stream)
Try
Dim sr As New StreamReader(fromStream)
Dim sw As New StreamWriter(toStream)
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





Aug 23 '07 #6
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.Redirect on PostBack, there is no JavaScript involved.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Mike" <mi**@mike.comwrote in message
news:Os**************@TK2MSFTNGP04.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.Redirect"? Would we be able to execute a Javascript like
"parent.parent.myProperty = true;" from a IFRAME (page) that was
redirected through "Response.Redirect", or would we run into the
cross-site Javascript problem?

Thanks.
Mike
******
If url.IndexOf("isremote=true") = -1 Then
' The request is forwarded back to the
default server.
request =
DirectCast(WebRequest.Create(remoteServer + url), HttpWebRequest)
request.Credentials =
CredentialCache.DefaultCredentials

ElseIf url.IndexOf("isremote=true") <-1 Then
' Keeps the request to the local server, no
need to re-route it.
url = url.Replace("redirected=true",
String.Empty)
request =
DirectCast(WebRequest.Create(localServer + url), HttpWebRequest)
request.Credentials =
CredentialCache.DefaultCredentials
End If
request.Method = "POST"
request.ContentType =
"application/x-www-form-urlencoded"
Dim RawBytes() As Byte = readRequest(context)
request.ContentLength = RawBytes.Length
Dim newStream As Stream =
request.GetRequestStream()
newStream.Write(RawBytes, 0, RawBytes.Length)
newStream.Close()

' Create a Response.
Dim myHttpWebResponse As HttpWebResponse =
CType(request.GetResponse(), HttpWebResponse)
' Get the stream associated with the response.
Dim receiveStream As Stream =
myHttpWebResponse.GetResponseStream()
' Pipes the stream to a higher level stream reader
with the required encoding format.
Dim readStream As New StreamReader(receiveStream,
Encoding.UTF8)

'Stream the data in a single operation to the
context's response.
context.Response.Write(readStream.ReadToEnd())
myHttpWebResponse.Close()
readStream.Close()
*********

"Kevin Spencer" <un**********@nothinks.comschrieb im Newsbeitrag
news:OO**************@TK2MSFTNGP05.phx.gbl...
>I'm not following you. Response.Redirect 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**@discussions.microsoft.comwrote in message
news:F3**********************************@microso ft.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.Redirect?

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Mike" <mi**@mike.comwrote in message
news:Op**************@TK2MSFTNGP05.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 AsyncProxyHandler
Implements IHttpHandler, IRequiresSessionState

Public Sub ProcessRequest(ByVal context As HttpContext) Implements
IHttpHandler.ProcessRequest

Dim url As String = context.Request.RawUrl
url = url.Replace(context.Request.ApplicationPath, "")
Dim request As HttpWebRequest
request =
DirectCast(WebRequest.Create("http://localhost/AsyncProxy2/Default.aspx"),
HttpWebRequest)
request.Credentials = CredentialCache.DefaultCredentials

Try
Dim response As HttpWebResponse =
DirectCast(request.GetResponse(), HttpWebResponse)
Dim responseStream As Stream =
response.GetResponseStream()
Dim output As Stream = context.Response.OutputStream
CopyStream(responseStream, output)

Catch we As System.Net.WebException

End Try

End Sub

Private Sub CopyStream(ByVal fromStream As Stream, ByVal toStream
As
Stream)
Try
Dim sr As New StreamReader(fromStream)
Dim sw As New StreamWriter(toStream)
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






Aug 24 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
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...
3
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...
4
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...
3
by: Ralf Müller | last post by:
hi all! in my custom HttpHandler HttpContext.Current.Session is not set - why? greetings, ralf
9
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...
7
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="*"...
8
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...
5
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"...
5
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...
5
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.