468,507 Members | 1,577 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,507 developers. It's quick & easy.

cookieless Session and httpHandler configuration

Hi,

I have a own HttpHandler running and configured like this in my web.config:

<add verb="*" path="subfolder/*.ashx" type="Class,Assembly"/>

Now, when turning cookieless Sessions on my HttpHandler is not working,
instead my second HttpHandler is invoked, which is configured for *.ashx
files.

How can I get the first one running if cookieless Sessions are enabled?

Regards,
Michael

Apr 4 '06 #1
3 1979
Hi Michael,

Welcome to the ASP.NET newsgroup.

From your description, you're configuring a custom httphandler to process
the requests to a given extension in a sub directory in the application.
However, you found the handler not work when the application is using
cookieless session(uri based) ,correct?

Based on my experience, for configuring httphandler for sub directory, we
should use a web.config in that certain sub dir or the <location>
configuration element rather than embeded the directory path into the
httphandler path. for example:

the following web.config use a <location> element to configure the
httphandler to serve requests to that sub dir:

===============
<configuration>
..............

<location path="Navigation">
<system.web>
<httpHandlers >
<add verb="*" path="Report.ashx" type="ReportHandler, __code"/>
</httpHandlers>
</system.web>
</location>
</configuration>

Here is the detailed description on using the <location> element to perform
hierarchical configuration:

#How to: Configure Specific Directories Using Location Settings
http://msdn2.microsoft.com/en-us/lib...92(vs.80).aspx

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 5 '06 #2

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> schrieb im Newsbeitrag
news:1e**************@TK2MSFTNGXA01.phx.gbl...
Hi Michael,

Welcome to the ASP.NET newsgroup.

From your description, you're configuring a custom httphandler to process
the requests to a given extension in a sub directory in the application.
However, you found the handler not work when the application is using
cookieless session(uri based) ,correct?

Based on my experience, for configuring httphandler for sub directory, we
should use a web.config in that certain sub dir or the <location>
configuration element rather than embeded the directory path into the
httphandler path. for example:

the following web.config use a <location> element to configure the
httphandler to serve requests to that sub dir:

===============
<configuration>
.............

<location path="Navigation">
<system.web>
<httpHandlers >
<add verb="*" path="Report.ashx" type="ReportHandler, __code"/>
</httpHandlers>
</system.web>
</location>
</configuration>

Here is the detailed description on using the <location> element to
perform
hierarchical configuration:

Great, this is working!!! Thanks Steven

Regards,
Michael


#How to: Configure Specific Directories Using Location Settings
http://msdn2.microsoft.com/en-us/lib...92(vs.80).aspx

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 5 '06 #3
You're welcome Michael,

Have a good day!

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 5 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by JV | last post: by
3 posts views Thread by Scott | last post: by
4 posts views Thread by Jeremy Lew | last post: by
2 posts views Thread by Daniel Malcolm | last post: by
2 posts views Thread by Water Cooler v2 | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.