HttpHandlers / Modules :: Remove The .ASPX From The URL?
May 28, 2010This can be accomplished by overriding the Application_BeginRequest method in the Global.ascx file:
[Code]....
This can be accomplished by overriding the Application_BeginRequest method in the Global.ascx file:
[Code]....
i m using vs2005 for development
i haev desing a one web page with size ( 15 k) now i want to remove the white space and make it in one single line .
I have an Handler.ashx file and on .aspx page load it calles the .ashx file for image reading. I am attempting to pass a session from the .aspx file to the .ashx file in order to make my query of grabing the image secure. The problem is that everytime I call a session: HttpContext.Current.Session["ID"], the value is returning null or errors saying the o so commong "Object reference not set to an instance of the object". I have tried a couple ways of grabing the session:
1.) context.Session["ID"]
2.) HttpContext.Session["ID"]
3.) HttpContext.Current.Cache["ID"]
none of them are giving me the ID session set in the .aspx page. should i be using Server.Transfer instead? is there a way to grab a session variable set in a .aspx page and called in a .ashx page?
Our website used to be a php website, now everything changed to .net, but the customer still want to keep the original php Request url. I want to know How to set Handler mapping on IIS7 to redirect .php file to .aspx file ? In more details, when you click handler mappings on IIS 7.0, what kind of hanlder should you add (add managed handler or add script map or add wild card script map or add module mapping) to redirect .php file to .aspx file?
View 1 RepliesI am using a generic handler (indicator.ashx) to create a graphic that is overlayed from information from a table (called LIVE) from our SQL database. This is working very well and I am very happy with the results.
However I am having an undesirable issue where the query string that is used for this is also being accessed by another page (called ReceiveLive.aspx) which is populating our LIVE table with data when we don't want this. I have been able to track this issue down to our generic handler that seems to populate this table with data whenever the handler is accessed.
The query string that is used to access our graphic through our generic handler is
http://mydomain.com/indicator.ashx?ID=ABC001.
Our other page that writes data to our LIVE database used the query string
http://mydomain.com/live.aspx?ID=ABC001 which is normally only accessed by a small piece of software that sits on the users PC and sends the data when necessary.
My question is this: How do I prevent data from being written to our LIVE table via the Live.aspx page everytime a query string is processed by my indicator.ashx is accessed?
After adding a custom module, Module list is showing MyModule "Entry Type" as "Local".
and Entry Type of all other modules is "Inherited".
what is Entry Type and difference between "Local" and "Inherited"?
is httpmodules executed each and every time in request and response cycle ?? if Yes is it possible to disable a specific http module ??
View 3 RepliesHow do we findout the whether the application is using any HTTPModules and httphandler in the applicaion?Is there anyway to findout from the url without checking the web.config file?
View 1 RepliesI got a website [URL] and I want to redirect http://www.example.com/folder to http://folder.example.com so if
folder has a page called example1.aspx [URL]
It should be called in this way:
http://folder.example.com/example1.aspx Is that possible that using IIS 7 and asp.net 4.
what is httphandler?what is the use ?
View 7 RepliesI have a HttpModule that rewrites the url:
eg: Folder/StaticPage.aspx?PageName=TestPage is re-written as
Folder/TestPage
This works fine on my local dev. machine on the Cassini server. But when its hosted in IIS (5.1 & 7.0) it fails to work, with the error as 404 Page Not Found.
I have written simple http module just to print Hello. but it is not working.
View 10 RepliesI am using Httphandler to access my pages. Have Loginstatus Control on the master pages.
OnLoggingOut for the Loginstatus control I am doing a Session.abandon()... But My session_end
does not get called in the Gobal.asax.I tried link button and everything. but when I take out the httphandler the Session_end gets executed in global.asax
I can handle the full session end on my own but is there any way to call Session_end in global.asax?
If I have an & in the URL I get a bad request. I have followed the instructions at [URL] but still no luck. If I remove
[Code]....
from web.config it works. Encoding the URL does not help.
I am trying to attach a pdf to a MailMessage, but it is not a file, rather it is a web page.
Allthough the pages respondes the PDF normaly, when I am attatching the IO.Stream to MailMessage, it is only 300B, so it cannot be opened.
This is the code:
[Code]....
Also I tried this one, but failed too:
[Code]....
I wants to url rewriting like as subdomain.
For example my website is website.com so that now i wants to url rewriting like
client1.website.com ,
client2.website.com,
client3.website.com,
clientN.website.com
In my website there are list of client whenever click on client my url like this
website.com/client.aspx?client=client1
website.com/client.aspx?client=client2
website.com/client.aspx?client=client3
website.com/client.aspx?client=clientN
Now i wants to url rewriting like as
client1.website.com
client2.website.com
client3.website.com
clientN.website.com
Also whenever once client is registered,After that client can directly open site
I have created my url rewrite handler and its working fine, but on live site i have IIS 6
and its not accepting the subdomain requests
when i type
http://website.com
it works fine but with
http://sub.wesite.com
i got the error Server not found
the project i'm working right now, client wants to make url seo friendly, if any event would enter from the admin section the url should show the name of the event itself.
right now it shows www.--------.com/eventdetails.aspx?id=879878
but the client wants www.---------.com/eventname/
the event comes dynamically every day.
I would like to perform HttpWebrequest every 10 min in my website. Right now it is performing onbutton click.
View 1 RepliesHow do I url rewrite without id in Address Bar?
Example:
[URL]
I don't want this..
[URL]
Is it possible?
I have 2 asp.net apps, each on a different server and with its own SS2005 db.
What I need is to grab the data entered in a form in app1 and insert that "behind the scenes" into the app2 db.
I suppose I have to do a POST in app1 and intercept that in app2, but since I've not done much http handling yet, I could use some hints or even examples if possible.
The data to be transferred is all strings.
I am looking for the solution of how do I get the html of a web page through proxy. I have an input of proxy server name, port number, url of web page and accelerated_pac_base.pac file which contains FindProxyForURL(url, host) method. [URL] has more information about PAC file. How do I do this in c#.
View 5 RepliesI have a Gridview,on that first column is a Link Button and HiddenField. I bind the Filepath to both controls. my question is
1.How to find the selected row HiddenField data(path).
2. To print that selected File using Javascript.
How to do this?
I have this code that does not return a 304 not modified, instead always a 200 ok found. Any clues what I'm doing wrong?
[Code]....
I have a form with a server side button, clicking on which session variable is added Session.Add("ABC","123")After this (in same postback event), I redirect user to a site, which returns user back to my site. And I still have session "abc" available to me.NOW, In another scenario I am trying to do the same thing but in a handler. I.e.User clicks a clinet side button which redirects users to sameSite.xyz. Handler of xyz adds session variable like above and redirects user to the other site. But, this time when user returns back from other site, my session is lost. How can I imitate scenario 1 with handlers?
View 2 Replies