1. rajendra10/10/2008 10:29:03
i worked on the url mapping in global.aspx file the things are working properly offline but when i tried to do this online it is not working properly...
in offlline i wans giving the url like localhost/go/1001
in online the sme thing is there but not working ....
can anyone give me the solution
rajendra
2. Ronald07/03/2007 13:15:12
Homepage: http://www.booden.net
The solution suggested here didn't work for me, but it made the problem clear to me, so thanks for that.
I have simulated the problem using the debugger, and copied the _tmp.htm file generated bij Visual Studio. Used ieHTTPHeaders to view http header info. Renamed a copy of the _tmp.htm file to .html and looked at the contents. It seemed that these files returned different content. The .html file looked the same as the original file, while the .htm file looked different in the browser than the original file. It seemed that the encoding was different, .Net and IIS handle this differently.
Trying some different approaches I found that adding some code to the custom handler for .htm could eliminate the problem. Here is the part of the code that fixed the problem for me:
context.Response.ContentEncoding = Encoding.GetEncoding(0); //use regional setting ANSI (prevents the problem)
context.Response.WriteFile(url);
So, if you check for _tmp.htm files, and handle them using the above code, your Visual Studio 2003 will be happy again.
(Don't forget to remove the 'vs*_tmp.htm' handler if you tried it.)
Hopefully this will help others, stumbling on the same problem. This solution made me much happier than removing the .htm extension in IIS and adding it back every time.
(I have used Visual Studio 2003 with SP1.)
3. techieman06/07/2006 10:26:22
I hv added following piece of code to my web.config:
<httpHandlers>
<add verb="*" path="*.htm" type="System.Web.StaticFileHandler" />
</httpHandlers>
But still I m getting error of "Page can not be found". Can n e one please help me ASAP.
4. jedatu05/26/2006 16:12:14
Wow! I have been struggling off and on with this for probably 2 years. At times I have had this error because of Visual Studio's cached files, but one particular project I have, has always been difficult! It would work sometimes and then suddenly stop.
I would recreate the project from scratch and it would work fine. Then I would close and reopen it only to have it fail. I knew about the files going back and forth and I had seen other posts about setting permissions and setting mime types and more. Like you mentioned the documentation here are thin and the error messages are useless.
Guess what. I was mapping the .htm extension to the ASPNET_ISAPI.DLL. Based on this post, I tried adding the httpHandlers to the config, but that didn't work. Maybe they need to be in the correct sequence. For now, I have resorted to removing the .htm extension mapping in IIS before opening the project, then re-adding it. A slight inconvenience compared to my previous experience.
Thanks for posting this!
5. Yusuf02/12/2006 09:54:16
Hi
I installed sample asp.net applications (vb.net) using the setup that came with a ms press book. I am getting the "The two need to map to the same server location" error. I tried the solution you gave. I added the <add verb.../> nodes under the <configuration/system.web> node, but I still get the same error. Please can someone help me. I searched all over the net but could not find a solution. Please, please some one help me
6. Andrey09/21/2005 20:58:21
Homepage: http://www.ultrazoom.ru
My VS7 started to tell me all of this "unable to open web project" and "file path does not correspond to the URL" and "The two need to map to the same server location" possibly when I have changed Global.asax.cs with changing incoming request page.htm to incoming.RewritePath("default.aspx"+param);
Other projects still working, but this one I can't load ... do u suggest me to kill FPE somehow, but how?
7. Barry09/15/2005 17:58:52
Ditto. Thanks. Saved me many hours.
8. Matthew King05/15/2005 10:37:04
Great Stuff! I've been suffering the pain of manually removing the file mapping on IIS everytime I want to open my web project
Id previously tried everything I could think of to make VS.NET open the project but never worked it out - this has just made life alot easier..
Thanks very much!
Su | Mo | Tu | We | Th | Fr | Sa |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |