~ character in master page URL

jcvallenato

New Member
I am developing an \[code\]ASP.NET\[/code\] application using a \[code\]masterpage\[/code\]. As default the \[code\]master page\[/code\] is referred on top of all the pages as \[code\]masterpagefile="~/mymasterpage.Master". \[/code\]My application works perfectly in the test environments under \[code\]IIS 6.0\[/code\] or \[code\]7.0\[/code\]When I publish it to the server (under \[code\]IIS 6.0\[/code\] - for which I don't know the server configuration) it gives me an error for the master page URL. When I remove the "~/" from all the pages it works perfectly but I would like to know the reason and also how can I change the configuration to make it work even with the following URL : \[code\]"~/mymasterpage.Master"\[/code\]Thanks
 
Top