How solve the error in web.config file in online server

Posted by Klbaiju under ASP.NET on 9/14/2014 | Points: 10 | Views : 2161 | Status : [Member] | Replies : 10
Hi,

I have developed an application in .net.it is working fine in local server.after uploading to online server and test.

there is an error showing in web.config. following is the error
Server Error in '/' Application.
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.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then 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 a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
. i have tried by adding this code in local server

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
then shows error in local server also.

How to solve it.

Regards
Baiju




Responses

Posted by: Arun7331 on: 9/14/2014 [Member] Starter | Points: 25

Up
0
Down
What is the .net version you are using and what version is on the server?

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Klbaiju on: 9/14/2014 [Member] Starter | Points: 25

Up
0
Down
iam using vs2010 a 4.0.
same i have uploaded.
what version is on the server?
i didn't understand

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Arun7331 on: 9/14/2014 [Member] Starter | Points: 25

Up
0
Down
@Klbaiju. You said its working on local, but throwing error when hosted on the server. Therefore, you need to find out the version on the server you are hosting.

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 9/14/2014 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Klbaiju,

Can you tell me what exactly is the error

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


This will show error on the page and post the error...... for more clarification

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Klbaiju on: 9/14/2014 [Member] Starter | Points: 25

Up
0
Down
Hi Arun .first time iam facing this error.iam uploading to a third party server. i don't know which version in server.
how do i know the version of server.i don't know anything about that.
if know clearly about that plz tell me clearly.
i have tried another way.
i have updated the web.config file with
<customErrors mode="Off"/> and uploaded
then the error was targetFramework="4.0".
i think version on server is not 4.0 or below that.
just share your knowledge


Regards
Baiju

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Arun7331 on: 9/14/2014 [Member] Starter | Points: 25

Up
0
Down
That is what I was trying to understand. There is a version issue.
You might have written the application using an older version and then migrated your existing application to 4.0. Correct me if I am wrong.
There is conflict between the versions.

1) Remove targetFramework='4.0' from the config file.
2) Create a dummy application using studio 10, that is 4.0 and copy the web.config contents in your application.

Let me know.


Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Klbaiju on: 9/14/2014 [Member] Starter | Points: 25

Up
0
Down
I have developed in vs2010.
I removed targetFramework='4.0' then there is an issue of System.Linq in .cs file.
i deleted both and upload it is working in online.
next i want to know how to set default page(set start up page in local) in online server.

Regards
Baiju

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Arun7331 on: 9/14/2014 [Member] Starter | Points: 25

Up
0
Down
Did you fix your first issue?

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Klbaiju on: 9/14/2014 [Member] Starter | Points: 25

Up
0
Down
Hi arun ,I fix the first issue.
do you know how to upload sqlserver database in to online server.


regards
Baiju


Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Klbaiju on: 9/16/2014 [Member] Starter | Points: 25

Up
0
Down
hi,Arun
Hi,

my my online application will work only if i removed

targetFramework="4.0".
if i remove this some namespace will not work.
how to solve this

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response