Monday, March 26, 2012

Trouble getting started

I have created a new website on my server. I save myfirst page and try to open it and this is the error I get..... can anyone help me...

Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The currentcustom error settings for this application prevent the details of theapplication error from being viewed remotely (for security reasons). Itcould, however, be viewed by browsers running on the local servermachine.

Details: To enable the details of this specific error message to beviewable on remote machines, please create a <customErrors> tagwithin a "web.config" configuration file located in the root directoryof the current web application. This <customErrors> tag shouldthen have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration
Notes: The current error page you are seeing can be replaced by acustom error page by modifying the "defaultRedirect" attribute of theapplication's <customErrors> configuration tag to point to acustom error page URL.

<!-- Web.Config Configuration File --
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

In your web.config file you have the following:

<customErrors mode="Off"/>

Change it to:

<customErrors mode="On"/>

So you will get the description of the real error.


Try it and that didn't work.. but I am not sure where to put that... so here is my xml file...

<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="false" strict="false" explicit="true" />
<pages>
<namespaces>
<clear />
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<add namespace="System.Web.UI.WebControls.WebParts" />
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->

</system.web>
</configuration>


You need to do this:

<customErrorsmode="Off" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>


Nope.. didn't work... same error. I am opening my .xmlfile in Visual studio and then just saving it... I don't have to rebootthe webserver or anything right. Also I am not on thewwwroot. My file is in wwwroot/asp

Rich


Hmmmm. Try to replace this:

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>

with this:
<customErrors mode="Off"/>


if mode=

"On" specifies that custom errors are enabled. If no defaultRedirect is specified, users see a generic error.

"Off" specifies that custom errors are disabled. This allows display of detailed errors.

"RemoteOnly" specifies that custom errors are shown only to remote clients, and ASP.NET errors are shown to the local host. This is the default.


Still not working. God this is frustrating. Is there some settings that I have to be changing on my server orsomething??

Since I am new to ASP.. do I need the web.config file?

What is the error that I am actually getting or you can't tell because the error won't show on the page??

Rich


I think you are working directly on your web site virtual path; where you have a tool "Visual Web Developper Express Edition" that you can download for free and work on it on a temporary folder; then after testing your site, you can upload it to whatever IIS server you wish. Correct me if this is not the situation that you are in.

After all, please post the page html, and code behind that you are trying to run.


Hello,

Please do bare with me. I am brand now to ASP, I am switiching from cold fusion.

Soi am working on my computer and I created a new website on mywebserver. I working out of a folder called ASP under thewwwroot.


Not sure what you mean by "web site virtual path". I openmy visual studio, and instead of creating a webstie on my webserver Icreated a new website on mycomputer. I can't seem tofind the directory where it created the website. I found theplace where I copy the files to the remote web site. So i copiedthe website through visual studio over to my webserver. I try toview the page but it give me the same error. Here is my code forthe web page I am trying to run. It is a general template and Ijust put some letters inside the form.

<%@. Page Language="VB" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server"
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
sdsdaf
</div>
</form>
</body>
</html


First in Visual Studio, there is a window called "Solution Explorer"; if you select the project (left click once on the root of the project), you will find in the properties window a property "Opened URL" which will show you what is the path of your project.

Second before uploading (copying) your files to the remote website, you can run your web application directly from Visual Studio by pressing F5 (to run with debugging enabled) or Ctrl+F5 (to run without debugging enable). So, try to run your application from Visual Studio and see what error you are getting.


As said above check for the virtual folder setting if problem still is not solved get the event log files and post the error message here.


Ok.. so I just did the F5 thing... and the page loaded fine.

So it started a local service host on my computer and ran the page with no errors.


SO now do I copy over to my webserver??

So now I can develop my whole site on my computer and then move it to my webserver??

Rich


Of course you can develop your website on your computer and then move it to your web server.

But you have already mentioned that you have created a website on your web server; are you sure you have configured it correctly? have you installed the asp.net extensions for this website?


I tried creating a new website right on my webserver. And I hit the F5 button, but ran fine with no errors. It lookedlike it ran off my local host on my terminal computer and not thewebserver. SO i went to the page through IE and ran it off thewebserver and then it kicked me the same error. So obivisouly anddon't have the .net set up right on my server. Anychance you know what is going wrong on my webserver...

Rich

0 comments:

Post a Comment