Monday, March 26, 2012

Web.COnfig Problem with SQL SERVER 2000 & ASP.NET

Hey friend..

I get some problem with web.config. I can access normally at localhost (My Local computer with SQL Server 2000 & ASP.NET)

but I get problem at my hosting. And the administrator dont know how to solve this problem.

The Problem are :

http://www.oasisusb.com/fengshui/FengShui.aspx ==> Appear Error when we visit .aspx files.

http://www.oasisusb.com/fengshui/home.html==> Normal Appear when we visit .html files.

Anybody can help me? Thank you Friends.

Sandy Hua

Indonesia

Post the error messages please. It could be as simple as your host doesn't have ASP.NET installed, to a wrong framework setup, secuirty settings, etc.

Jeff


Thank's for your response jeff..Here is the web.config contain ( http://www.oasisusb.com/fengshui/WebConfig.txt ) ==> It's still localhost setting(My local computer setting). -- How do I change the code so I can running at hosting service?Maybe Here The Information that you need :Database Name : FENGSHUI User : oasispasswd : sandyDo I have change the IP Address?Here is the error Session ( http://www.oasisusb.com/fengshui/FengShui.aspx ) :Server Error in '/' Application.Runtime ErrorDescription: 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.Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off". Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.

Hi,

You are getting web.config message at your development site, its because that your application encountering some problem at development site.

and since in your web.config you might have setting like below

<customErrors mode="RemoteOnly" />

If can change it

<customErrors mode="Off" />

then you can view exact error which occurred at hosting site.

Then u can solve that error.

Bye

Amit


Hi Sandy, any update for this issue? You really need to turn off custom error and post the actual error message, as well as your connection string.

Hi Lori jay and friends..

My Default web.config setting is <CustomErrors mode="RemoteOnly"/>

Based your advice, I tried to change become

 <customErrors mode="On"/> and even <customErrors mode="Off"/>.
But the error message still unchanged so I can't view exact error.
The Error Message at (http://www.oasisusb.com/fengshui/fengshui.aspx )  
Here the last settingweb.config file code (http://www.oasisusb.com/fengshui/webconfig.txt )
Fengshui.aspx code file at (http://www.oasisusb.com/fengshui/fengshui-aspx.txt ) 
Fengshui.aspx.vb code file at (http://www.oasisusb.com/fengshui/fengshui-aspx-vb.txt ) 
Fengshui.aspx.resx code file at (http://www.oasisusb.com/fengshui/fengshui-aspx-resx.txt )
Maybe, There are any wrong code setting.
Thank's very much for all your response friends.
 
Sandy HUA
 
 



Hi Sandy, the error message now is as following:
"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."

?So let's check the website in IIS manager: click Start->Run->inetmgr->navigate to the website virtual path->check Properties->Directory tab-> make sure the virtual directory has been configured as application. If not, click Create button to create a web application.

BTW, there is something wrong with the webconfig. Change this line:
<customErrors mode="OFF" /
To: <customErrors mode="Off" /
Because XML documents are case-sensitive.

Hi Sandy,

Yeah Iori is right. Set your virtual directory as an application.

Good Luck


hello Lori Jay.. Thx your solution..Web.config is ok already. Now the problem is set inherits load file location.

The error is began from this global.ascx. After I changed inherits="ftp.oasisusb.com.Global", the error is fixed.

Here the global.ascx code only : <%@. Application Codebehind="Global.asax.vb" Inherits="ftp.oasisusb.com.Global" %> ==> the error is fixed.

And then the next error at

http://www.oasisusb.com/pakwa.aspx ( source code athttp://www.oasisusb.com/Pakwa.txt )

at Heading.ascx file (source code athttp://www.oasisusb.com/Components/Heading.txt )

I have tried to changed it with this code but still doesn't work

inherits = "ftp.oasisusb.com.Components.Heading " or "ftp.oasisusb.com.Components.Heading.ascx "

inherits = "ftp.oasisusb.com.Heading " or "ftp.oasisusb.com.Heading.ascx "

inherits = "Components.Heading " ,

inherits = "C:\Inetpub\vhosts\oasisusb.com\httpdocs\Components\Heading" etc...

http://www.oasisusb.com/home.aspx ( source code athttp://www.oasisusb.com/Home.txt )

How do I change the inherits setting. I have tried them

inherits="ftp.oasisusb.com.Home" orftp.oasisusb.com.Home.Components etc...but still doesn't work.

Thx a lot for your response lori jay and asp.net forum's friends.


Check @.Page Directive

At first look, I have one doubt. What is the version of framework installed on the webserver? and your application is written on .NET 1.x. Is it? And also you should not change the inherits value unless you have put your class files in the same heirarchy namespace as you are defining. Inherits is the class name that your page inherits. By default it will be your aspx file name and will be in global namespace. Unless you have moved your class to a heirarchy shown below, you should not change them to "ftp.oasisusb.com.Components.Heading"

namespace ftp.oasisusb.com{
public partial class Heading (...) {}
}

Thanks

0 comments:

Post a Comment