<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'httphandler'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=httphandler&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'httphandler'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>The system.webServer/handlers/add element for http handlers has an allowPathInfo attribute. What is it for?</title><link>http://forums.asp.net/thread/3549530.aspx</link><pubDate>Sat, 05 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3549530</guid><dc:creator>Shayke</dc:creator><description>&lt;div&gt;
&lt;p&gt;I&amp;#39;m playing with http
handlers. When adding an http handler to the web.config, in order to
make it process special extensions on IIS 7, you need to register it
under the system.webServer/handlers element. The add element there has
an allowPathInfo attribute and I can&amp;#39;t understand what is it for...&lt;/p&gt;
&lt;p&gt;MSDN says: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Specifies whether the handler
  processes full path information in a
  URI, such as
  contoso/marketing/imageGallery.aspx.
  If the value is true, the handler
  processes the full path,
  contoso/marketing/imageGallery. If the
  value is false, the handler processes
  only the last section of the path,
  /imageGallery.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It doesn&amp;#39;t help so much... Anyone?&lt;/p&gt;
&lt;p&gt;Thanks,
Shay.&lt;/p&gt;
&lt;/div&gt;</description></item><item><title>Session Variables Inside C# Class</title><link>http://forums.asp.net/thread/3524166.aspx</link><pubDate>Fri, 20 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3524166</guid><dc:creator>vfarmak</dc:creator><description>&lt;p&gt;Hi Everyone!&lt;/p&gt;&lt;p&gt;I am experiencing the following problem: in my Global.asax file in the Session_Start method i have added a Session Variable named &amp;quot;AppCulture&amp;quot;, just like the code listed below:&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;    void Session_Start(object sender, EventArgs e) 
    {
        // Code that runs when a new session is started
        Session.Add(&amp;quot;AppCulture&amp;quot;, &amp;quot;el-GR&amp;quot;);
    }&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; In my Class Method I have a function, in which i want to check the session&amp;#39;s variable value. In order to do that i use the following statement, as listed in the code below: &lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;public static string CustomMethod()
        {
            string lang = HttpContext.Current.Session[&amp;quot;AppCulture&amp;quot;].ToString();
            if (lang.Equals(&amp;quot;el-GR&amp;quot;))
            {
                return &amp;quot;Ελληνικά&amp;quot;;
            }
            else
            {
                return &amp;quot;English&amp;quot;;
            }
        }&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; I use this method inside an EventHandler (file with .ashx extension), in order to fill dropdownlist values with javascript. Although i have initialized my session variable in the Session_Start section of the Global.asax file. The specific Session Variable inside the Class evaluates to null. Does anyone know other alternative in order to check session variables inside class code?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanx Bill&lt;br /&gt;&lt;/p&gt;</description></item><item><title>ScriptManager, Dynamic Script, and UpdatePanel</title><link>http://forums.asp.net/thread/3472948.aspx</link><pubDate>Thu, 22 Oct 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3472948</guid><dc:creator>ldadams</dc:creator><description>&lt;p&gt;I am writing an&amp;nbsp;asp.net application and would like to provide an easy way for developers to inject client script into the page.&amp;nbsp; This application has an updatePanel in which most all things happen inside.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;So what I did was create a DynamicScript object that takes in a string (some&amp;nbsp;client script)&amp;nbsp;and appends a session var.&amp;nbsp;&amp;nbsp;Then I have an HttpHander for a path of __dscript.axd.&amp;nbsp; This handler grabs the sessioned script and writes it out to the stream.&amp;nbsp; I register the include for this handled file with the ScriptManager.RegisterScriptInclude() static method.&lt;/p&gt;
&lt;p&gt;One of my main issues seems to be I can not control the&amp;nbsp;order of this include inside the DOM.&amp;nbsp; My application uses a couple script libraries including jQuery which are referenced using the compositeScript property of the scriptManager control.&amp;nbsp; My script seems to always be added before these other includes are added causing my dynamic calls that use these libraries to fail.&lt;/p&gt;
&lt;p&gt;What I would like:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;All postbacks regardless if async needs to re-reference my __dscript.axd script as to execute the updated client methods it contains.&lt;/li&gt;
&lt;li&gt;This include needs to be registed as close to the bottom of the page as possible as to have access to all elements and referenced script includes.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;I have tried this about a million ways with no luck.&amp;nbsp; Does anyone know of a proven way to do this or know of a control out there that will assist?&lt;/p&gt;
&lt;p&gt;Thanks for any help!&lt;/p&gt;</description></item><item><title>Re: URL Rewriting Dynamic</title><link>http://forums.asp.net/thread/3452986.aspx</link><pubDate>Mon, 12 Oct 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3452986</guid><dc:creator>samirindianic</dc:creator><description>&lt;p&gt;i got the solution&lt;/p&gt;&lt;p&gt;rule is &amp;lt;rule url=&amp;quot;/(.+).aspx&amp;quot; rewrite=&amp;quot;/CategoryDes.aspx?Name=$1&amp;quot;&amp;gt;&amp;lt;/rule&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;but now i have a question that &amp;nbsp;if i gave a rule to particular page should i give the rules to others page also.because the others pages are not display.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Reply me as soon as possible&lt;/p&gt;</description></item><item><title>HttpHandler throwing 404</title><link>http://forums.asp.net/thread/3448685.aspx</link><pubDate>Thu, 08 Oct 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3448685</guid><dc:creator>joelycat</dc:creator><description>&lt;p&gt;I&amp;#39;ve implemented an HttpHander for PDFs.&amp;nbsp;The idea is to take the request and then generate the correct document and stream it back. The problem is when I request a file that doesn&amp;#39;t actually exist, the HttpHandler never fires and&amp;nbsp;the browser&amp;nbsp;gives a 404 page??? I know the handler is registerd correclty because, as stated, if I give it an existing PDF name I can step through the handler code no problem.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve done something very similiar before and&amp;nbsp;the handler worked fine with non-existent files. Any ideas? Thanks.&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;&lt;font color="#a31515" size="1"&gt;&lt;font color="#a31515" size="1"&gt;&amp;lt;add&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;&lt;font color="#ff0000" size="1"&gt;path&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt;*.pdf&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;&lt;font color="#ff0000" size="1"&gt;verb&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt;*&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;&lt;font color="#ff0000" size="1"&gt;type&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt;MXMWeb.ESBaseMasterResources.PDFTemplates, MXMWeb&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/joel&amp;gt;&lt;/p&gt;</description></item><item><title>Post file from static html page to a http handler</title><link>http://forums.asp.net/thread/3404703.aspx</link><pubDate>Mon, 14 Sep 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3404703</guid><dc:creator>mhrist</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am trying to submit a file from a static&amp;nbsp;.html page on one server to a .aspx or .ashx (http handler) and since I cannot put runat=server on the html&amp;nbsp;the Request.PostedFiles or whatnot does not get populated. And I put multipart/form-data&amp;nbsp;encoding and everything.&lt;/p&gt;
&lt;p&gt;Back in the day you had to use a third party component like AspUpload but there is no .NET version which is a bummer.&lt;/p&gt;
&lt;p&gt;Marty&amp;nbsp;&lt;/p&gt;</description></item><item><title>Passing Request Headers from one application to another</title><link>http://forums.asp.net/thread/3388078.aspx</link><pubDate>Fri, 04 Sep 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3388078</guid><dc:creator>calkenn</dc:creator><description>&lt;p&gt;I have one application (CreateRequestHeader) containing a button and a link button. &amp;nbsp;When the button is clicked i am adding a header key (proj_user) and adding the user name as the value.&lt;/p&gt;&lt;p&gt;The link button will open up another application (ReadRequestHeader) where i would like to read the request header to get the value of proj_user created in CreateRequestHeader&lt;/p&gt;&lt;p&gt;Code:&lt;/p&gt;&lt;p&gt;CreateRequestHeader class:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;protected void CreateRequest(object sender, EventArgs e)&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NameValueCollection headers = HttpContext.Current.Request.Headers;&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Type t = headers.GetType();&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PropertyInfo p = t.GetProperty(&amp;quot;IsReadOnly&amp;quot;, BindingFlags.Instance | BindingFlags.IgnoreCase | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy);&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.SetValue(headers, false, null);&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;headers.Add(&amp;quot;x-qsp-user&amp;quot;, txtUserName.Text);&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;txtCreate.Text = Request.Headers.ToString();&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;p&gt;&lt;p&gt;protected void CreateRequest(object sender, EventArgs e)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NameValueCollection headers = HttpContext.Current.Request.Headers;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Type t = headers.GetType();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PropertyInfo p = t.GetProperty(&amp;quot;IsReadOnly&amp;quot;, BindingFlags.Instance | BindingFlags.IgnoreCase | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.SetValue(headers, false, null);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;headers.Add(&amp;quot;proj-user&amp;quot;, txtUserName.Text);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;CreateRequestHeader aspx:&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt;	&lt;/span&gt;&amp;lt;asp:LinkButton runat=&amp;quot;server&amp;quot; Text=&amp;quot;Send Request&amp;quot; OnClientClick=&amp;quot;window.open(&amp;#39;http://localhost/ReadRequestHeader&amp;#39;,&amp;#39;requestread&amp;#39;)&amp;quot; /&amp;gt;&lt;/p&gt;&lt;/p&gt;&lt;p&gt;In ReadRequestHeader I am attempting to get the value of proj_user by looking at the&amp;nbsp;Request.Headers values. &amp;nbsp;However, the proj_user header key does not exist.&lt;/p&gt;&lt;p&gt;Is there a way to do something like this?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item><item><title>URL Rewriting/Redirecting for WebService(s) using HttpHandler renders blank page</title><link>http://forums.asp.net/thread/3384755.aspx</link><pubDate>Thu, 03 Sep 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3384755</guid><dc:creator>SethuramR</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I am trying
out with a simple URL redirection technique; if I am successful in this approach
I will go ahead in implementing friendly RESTful urls for my application.&lt;/p&gt;
&lt;p&gt;Problem I am
facing in URL redirection using Http Handler:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have
created a VisualStudio2008 webservcie application.&lt;/p&gt;
&lt;p&gt;Added 2
services, Service1.asmx and Service2.asmx.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Scenario
1:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Added an
Http Handler (GenericHandler) class in the same hierarchy. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Added the
below code in ProcessRequest method,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;if (context.Request.PhysicalPath.IndexOf(&amp;quot;Service1.asmx&amp;quot;)
&amp;gt; -1)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
context.RewritePath(&amp;quot;~/Service2.asmx&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Registerd
the Handler in the httpHandler section of the webconfig, the bold one&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;lt;remove verb=&amp;quot;*&amp;quot; path=&amp;quot;*.asmx&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;add verb=&amp;quot;*&amp;quot; path=&amp;quot;*.asmx&amp;quot; validate=&amp;quot;false&amp;quot; type=&amp;quot;System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;add verb=&amp;quot;*&amp;quot; path=&amp;quot;*_AppService.axd&amp;quot; validate=&amp;quot;false&amp;quot; type=&amp;quot;System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;add verb=&amp;quot;GET,HEAD&amp;quot; path=&amp;quot;ScriptResource.axd&amp;quot; type=&amp;quot;System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35&amp;quot; validate=&amp;quot;false&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;b&gt;add&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;verb&lt;/b&gt;&lt;b&gt;=&lt;/b&gt;&lt;b&gt;&amp;quot;*&amp;quot; type=&amp;quot;RESTWS.RESTHandler,RESTWS&amp;quot; path=&amp;quot;*.asmx&amp;quot;/&amp;gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Now, I run
my application by making Service1.asmx as
the start page, the process hits my handler code, executes it with out any
expection, but atlast I see a blank screen in the browser.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For crossing
my code I also did the following,&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Scenario
2:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;Added a Global.asax
file in the in the same hierarchy.&lt;/p&gt;
&lt;p&gt;Added same
code in Application_BeginRequest&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if
(Context.Request.PhysicalPath.IndexOf(&amp;quot;Service1.asmx&amp;quot;)
&amp;gt; -1)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Context.RewritePath(&amp;quot;~/Service2.asmx&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Commented
out the Handler registry part what I added in the webconfig.&lt;/p&gt;
&lt;p&gt;Again ran
the application, the redirection from Service1.asmx to Service2.asmx happened
successfully as expected.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Scenario
3:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;When I have
both the Global.asax and the httphandler enabled, again I get a blank page.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Scenario
4:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I felt that
httpHandler doesnot suppport url redirection in the case of asmx(webservices),
so I tried the same above procedures and scenarios with &lt;b&gt;VisualStudio2008 Web
application&lt;/b&gt; with 2 aspx pages (Default1.aspx and Default2.aspx) instead of &lt;b&gt;Web
service application&lt;/b&gt;. But the results were same as the above scenarios.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My Questions:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;What is the mistake I am doing in my
above scenarios?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;How to perform urlredirection for web
services using Http Handlers?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Thanks in Advance.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;</description></item><item><title>How to validate my .aspx page access before it is accessed</title><link>http://forums.asp.net/thread/3357220.aspx</link><pubDate>Wed, 19 Aug 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3357220</guid><dc:creator>JPalaparthi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am implementing a Role based web portal.Each and every .aspx page to be accessed before it is validate with the role privilage.&lt;/p&gt;
&lt;p&gt;So I would like to implement the validation before the .aspx page getting accessed.&lt;/p&gt;
&lt;p&gt;Clearly without writing the code in each and every .aspx page can I validate the requested page by chacking the role privillage in the database?&lt;/p&gt;
&lt;p&gt;--&amp;gt; The code should be executed after the Log in screen.Once user logs in then .bla bla bla&lt;/p&gt;
&lt;p&gt;I tried to write httpHandler but i am failed to use it .&lt;/p&gt;
&lt;p&gt;I check for an every event to check every request in Global.asax but for every request there is no event. i.e. only for Application_Start and the Session_Start.&lt;/p&gt;
&lt;p&gt;So please provide me assistance to complete this task .&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Jitendra&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Firefox 3.5 + Firebug 1.4 - Issue with 304 + If-Modified-Since headers</title><link>http://forums.asp.net/thread/3307565.aspx</link><pubDate>Wed, 22 Jul 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3307565</guid><dc:creator>tmessbauer</dc:creator><description>&lt;p&gt;So I came across this earlier today while test driving some new code to compress css, js, etc.&amp;nbsp; Essentially, there is an httphandler that takes a list of resources, compresses them automatically (so you dont have to keep a dev and a minified version), then caches them until the file notification occurs.&amp;nbsp; All works great...&amp;nbsp; until it gets integrated to the site and I start inspecting the headers with the net tab in firebug...&amp;nbsp; Essentially, the page locks up intermittently and takes forever to render whenever a 304 is supposed to be returned.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Here are details of the issue...&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IE7/IE8, Chrome, Safari are all looking great.&amp;nbsp; Huge perf improvement as well.&lt;/li&gt;
&lt;li&gt;Stepping through a server side debugger proved that code was executing as expected and serving correct response based on etags and LM date.&lt;/li&gt;
&lt;li&gt;Occasionally FF reporting slow script.&amp;nbsp; While I dont remember the script&amp;#39;s name, it was not mine and I vaguely remember it having a FF like name.&lt;/li&gt;
&lt;li&gt;FF looks good if firebug is off (this was the key)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;So after some digging, I found that&amp;nbsp;latest version of Firebug 1.4 has an issue where it does not send the last modified header to the server correctly.&amp;nbsp; Since things like this usually take forever to track down, I was not so stoked.&amp;nbsp; So it was pretty awesome that this was already in bugzilla and there is a build that will prevent this from happening.&lt;/p&gt;
&lt;p&gt;So if you have the issue, update Firebug to 1.4a31.&amp;nbsp; I did and the issue disappeared immediately.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Here is the link for 1.4a31&amp;nbsp;- &lt;a href="http://getfirebug.com/releases/firebug/1.4/firebug-1.4.0a31.xpi"&gt;http://getfirebug.com/releases/firebug/1.4/firebug-1.4.0a31.xpi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is the post if you want more information - &lt;a href="http://code.google.com/p/fbug/issues/detail?id=1274#c16"&gt;http://code.google.com/p/fbug/issues/detail?id=1274#c16&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>