Monday, March 26, 2012

Trouble moving servers with asp.net

In moving a ASP.NET site from a W2K IIS5 server to a new W2K3 IIS6 server,
we are having trouble with what appears to be ASP.NET server side includes
in the .shtml files. I did not set up the old server or code the site and
have just been brought onto this project so I'm hoping someone out there
with a tad more experience can help me.
The code in the shtml file looks like this:
<%@dotnet.itags.org. Page language="c#" AutoEventWireup="false"
Inherits="MySite.Web.BasePages.MySiteBasePage" %> <%@dotnet.itags.org. Register
TagPrefix="MS" TagName="Header" src="http://pics.10026.com/?src=~/Controls/BasePagesl/Header.ascx" %>
<%@dotnet.itags.org. Register TagPrefix="MS" TagName="Footer"
Src="~/Controls/BasePages/Footer.ascx" %>
I have mapped the .shtml files on the site to use the aspnet_isapi dll which
matches the settings on the old server. Once I did this, I got an error:
"Server cannot access application directory <my directory>. The directory
does not exist or is not accessable due to security settings".
Fine. I went and granted rights to the folder to my ASPNET account as per
documentation. Still same error. Then I looked at the old server and noticed
that the Everyone account has access to the web folders. Fine. I granted
that permission. When I did that, the server dumps the the whole file to the
browser and does not interpret anything. Its just like it read it like a
text file.
Any ideas?
- RonSo on a whim, I renamed the page to have a .aspx extension and it works fine
that way!! But the page with
the .shtml extension does not, even though it *should* be mapped to execute
using the .NET framework. The
application extension mapping is the same as the .aspx pages. Seems that the
mapping is not working correctly?
"Ron Weldy" <ronweldy@.msn.com> wrote in message
news:ukY7gkK2EHA.2788@.TK2MSFTNGP15.phx.gbl...
> In moving a ASP.NET site from a W2K IIS5 server to a new W2K3 IIS6 server,
> we are having trouble with what appears to be ASP.NET server side includes
> in the .shtml files. I did not set up the old server or code the site and
> have just been brought onto this project so I'm hoping someone out there
> with a tad more experience can help me.
> The code in the shtml file looks like this:
> <%@. Page language="c#" AutoEventWireup="false"
> Inherits="MySite.Web.BasePages.MySiteBasePage" %> <%@. Register
> TagPrefix="MS" TagName="Header" src="http://pics.10026.com/?src=~/Controls/BasePagesl/Header.ascx" %>
> <%@. Register TagPrefix="MS" TagName="Footer"
> src="http://pics.10026.com/?src=~/Controls/BasePages/Footer.ascx" %>
>
> I have mapped the .shtml files on the site to use the aspnet_isapi dll
> which matches the settings on the old server. Once I did this, I got an
> error:
> "Server cannot access application directory <my directory>. The directory
> does not exist or is not accessable due to security settings".
> Fine. I went and granted rights to the folder to my ASPNET account as per
> documentation. Still same error. Then I looked at the old server and
> noticed that the Everyone account has access to the web folders. Fine. I
> granted that permission. When I did that, the server dumps the the whole
> file to the browser and does not interpret anything. Its just like it read
> it like a text file.
> Any ideas?
> - Ron
>
So on a whim, I renamed the page to have a .aspx extension and it works fine
that way!! But the page with
the .shtml extension does not, even though it *should* be mapped to execute
using the .NET framework. The
application extension mapping is the same as the .aspx pages. Seems that the
mapping is not working correctly?
"Ron Weldy" <ronweldy@.msn.com> wrote in message
news:ukY7gkK2EHA.2788@.TK2MSFTNGP15.phx.gbl...
> In moving a ASP.NET site from a W2K IIS5 server to a new W2K3 IIS6 server,
> we are having trouble with what appears to be ASP.NET server side includes
> in the .shtml files. I did not set up the old server or code the site and
> have just been brought onto this project so I'm hoping someone out there
> with a tad more experience can help me.
> The code in the shtml file looks like this:
> <%@. Page language="c#" AutoEventWireup="false"
> Inherits="MySite.Web.BasePages.MySiteBasePage" %> <%@. Register
> TagPrefix="MS" TagName="Header" src="http://pics.10026.com/?src=~/Controls/BasePagesl/Header.ascx" %>
> <%@. Register TagPrefix="MS" TagName="Footer"
> src="http://pics.10026.com/?src=~/Controls/BasePages/Footer.ascx" %>
>
> I have mapped the .shtml files on the site to use the aspnet_isapi dll
> which matches the settings on the old server. Once I did this, I got an
> error:
> "Server cannot access application directory <my directory>. The directory
> does not exist or is not accessable due to security settings".
> Fine. I went and granted rights to the folder to my ASPNET account as per
> documentation. Still same error. Then I looked at the old server and
> noticed that the Everyone account has access to the web folders. Fine. I
> granted that permission. When I did that, the server dumps the the whole
> file to the browser and does not interpret anything. Its just like it read
> it like a text file.
> Any ideas?
> - Ron
>
Hi Ron..
U can try checking:-
http://www.microsoft.com/india/msdn/articles/57.aspx
It shoud hELP u..
Patrick
"Ron Weldy" wrote:

> So on a whim, I renamed the page to have a .aspx extension and it works fi
ne
> that way!! But the page with
> the .shtml extension does not, even though it *should* be mapped to execut
e
> using the .NET framework. The
> application extension mapping is the same as the .aspx pages. Seems that t
he
> mapping is not working correctly?
>
> "Ron Weldy" <ronweldy@.msn.com> wrote in message
> news:ukY7gkK2EHA.2788@.TK2MSFTNGP15.phx.gbl...
>
>
Thanks. Great article. Unless I'm missing something, it's implying that I
need to create a http handler for this extension as well. I checked the
web.config file on the old server and I don't see anything in there like
this, and the .shtml files serve up correctly from there, so that makes me
somewhat suspicious.
Now there are several web sites hosted on the server although this site is
the only one where the original techie had overridden the mapping for the
.shtml files. I suppose it could be in a global configuration file... but I
am not sure where that is at. I would place a handler in the local file just
to see if that works but I am not sure of the correct class to use. I guess
it would be just System.Web?
- Ron
"Patrick.O.Ige" <PatrickOIge@.discussions.microsoft.com> wrote in message
news:AFB8138E-11FB-4C99-AC55-873CB94CFDAD@.microsoft.com...
> Hi Ron..
> U can try checking:-
> http://www.microsoft.com/india/msdn/articles/57.aspx
> It shoud hELP u..
> Patrick
> "Ron Weldy" wrote:
>
That was it. It was in the machine.config file. The class was
System.Web.UI.PageHandlerFactory.
Patrick, you are the man!
Thanks!
- Ron
"Ron Weldy" <ronweldy@.msn.com> wrote in message
news:%23vHQuON2EHA.3092@.TK2MSFTNGP10.phx.gbl...
> Thanks. Great article. Unless I'm missing something, it's implying that I
> need to create a http handler for this extension as well. I checked the
> web.config file on the old server and I don't see anything in there like
> this, and the .shtml files serve up correctly from there, so that makes me
> somewhat suspicious.
> Now there are several web sites hosted on the server although this site is
> the only one where the original techie had overridden the mapping for the
> .shtml files. I suppose it could be in a global configuration file... but
> I am not sure where that is at. I would place a handler in the local file
> just to see if that works but I am not sure of the correct class to use. I
> guess it would be just System.Web?
> - Ron
>
> "Patrick.O.Ige" <PatrickOIge@.discussions.microsoft.com> wrote in message
> news:AFB8138E-11FB-4C99-AC55-873CB94CFDAD@.microsoft.com...
>

0 comments:

Post a Comment