Hi, new to .Net. I am working on my first site in .Net and thought it was about time to publish it - to see if it worked and could be accessed on the web.
I have my own server which has a number of ASP sites on it - that all work okay.
The site in question is very simple so far. No database calls - and it only has two pages - default.aspx and a .htm file for testing.
Following the problems I am having I have made default.aspx even simpler. In fact it now looks like this:
<%@dotnet.itags.org. Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="DressDev._Default1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Hello
</div>
</form>
</body>
</html>
When I publish the site and try to view in a browser using the web address of the site I get this:
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
It works fine on my local machine. If I go to the web address and go directly to the .htm file I have there - it displays fine - so the site is definitely accessible from the web. But default.aspx will not run.
I have had a look through the settings in IIS and ...
the ASP.net version is 2.0.50727
the Authentication mode is windows
I had a read up on the web on the error and have this in the web.config file
<system.web>
<authentication mode="Windows"/>
<identity impersonate="true"/>
<anonymousIdentification/>
but it still won't work. Why is this so complicated? :(
I guess I am going to have to change it to an ASP app to get it to work. Can anyone help me please? Before I go over to the PHP side of things (ahh the blissful days of simple scripting ...:o )Is your dev computer running .Net 1.1? The CodeBehind attribute of the @.Page directive is no longer supported in .Net 2.0.
Turn Off custom errors in the web.config file so you can see the real error. Place the following in the <system.web> configuration section
<customErrors mode="Off"></customErrors>
Thanks for your reply.
I'm 99.99% certain my dev box is running .Net 2.0 ... how can I tell for sure?
I did as you suggested and the error message is:
Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\Web Sites\DressSense\web.config line 46)
Source Error:
Line 44:
Line 45: <httpModules>
Line 46: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 47: </httpModules>
Line 48: </system.web>
Looks like you created an Ajax site and your server doesn't have Microsoft Ajax installed.
Site runs on dev but not on live
That's the eternal programmer's lament!
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment