Gitti
asked on
Custom errors
My app. works fine on my local machine. Now I put it on the prodution server and get a Runtime Error.
This is the browser's message: "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"."
The problem is that the <customErrors> tag is set to Off!!!!!
Hier is the code in the web.config:
<system.web>
<customErrors mode="Off"/>
What could be wrong hier? How can I know what problem is occuring on the remote server?
Thanks!
This is the browser's message: "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"."
The problem is that the <customErrors> tag is set to Off!!!!!
Hier is the code in the web.config:
<system.web>
<customErrors mode="Off"/>
What could be wrong hier? How can I know what problem is occuring on the remote server?
Thanks!
ASKER
Hi and thanks for the answer. I am sorry, but it isn't clear for me what exactly to do? You mean I should remove the following code?
<customErrors mode="RemoteOnly" defaultRedirect="GenericEr rorPage.ht m">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm " />
It doesn't exist any more in the web.config file. The only tag that exists is: <system.web>
<customErrors mode="Off"/>
Nevertheless the browser still reads this tag: <customErrors mode="RemoteOnly" defaultRedirect="mycustomp age.htm"/>
Although IT DOES'T EXIST IN THE CODE!
Thanks
<customErrors mode="RemoteOnly" defaultRedirect="GenericEr
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm
It doesn't exist any more in the web.config file. The only tag that exists is: <system.web>
<customErrors mode="Off"/>
Nevertheless the browser still reads this tag: <customErrors mode="RemoteOnly" defaultRedirect="mycustomp
Although IT DOES'T EXIST IN THE CODE!
Thanks
Firstly check to see that you only have one web.config file.
Then check to see that it is properly formed.
Paste your entire web.config here. Possibly something else is wrong in it.
Then check to see that it is properly formed.
Paste your entire web.config here. Possibly something else is wrong in it.
ASKER
Ach many thanks! Hier is the whole web.config ;)
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="CommerceDataProvider " type="Commerce.Providers.D ataProvide rConfigura tionHandle r, Commerce.DataProvider"/>
<section name="CommerceOrdersProvid er" type="Commerce.Providers.O rdersProvi derConfigu rationHand ler, Commerce.OrdersProvider"/>
<section name="CommerceShoppingCart Provider" type="Commerce.Providers.S hoppingCar tConfigura tionHandle r, Commerce.ShoppingCartProvi der"/>
<section name="CommerceCatalogProvi der" type="Commerce.Providers.C atalogProv iderConfig urationHan dler, Commerce.CatalogProvider"/ >
<section name="CommerceTaxProvider" type="Commerce.Providers.T axProvider Configurat ionHandler , Commerce.TaxProvider"/>
<section name="CommerceShippingProv ider" type="Commerce.Providers.S hippingPro viderConfi gurationHa ndler, Commerce.ShippingProvider" />
<section name="CommercePaymentProvi der" type="Commerce.Providers.P aymentProv iderConfig urationHan dler, Commerce.PaymentProvider"/ >
</configSections>
<appSettings>
<!--PayPal Settings-->
<add key="SimpleTaxRate" value="0.0825"/>
<add key="BusinessEmail" value="business@csk.com"/>
<add key="RequireShipping" value="True"/>
<add key="RequireLogin" value="checkout"/>
<add key="SecureURL" value="http://localhost/pp2/"/>
<add key="SiteURL" value="http://localhost/pp2/"/>
<add key="ShipFromZip" value="96960"/>
<add key="ShowZeroInventoryItem s" value="True"/>
<!--the sandbox is PayPal's development server-->
<add key="UseSandbox" value="False"/>
<add key="UseDirectPay" value="True"/>
<!--setting this to true will override DirectPay-->
<add key="UsePayPalPaymentsStan dard" value="True"/>
<!--this is the currency code that will be sent to process the transaction
valid codes are "USD" (us dollar), "EUR" (euro), "GBP" (Brit pound), JPY (Japanese yen) etc.
-->
<add key="CurrencyCode" value="EUR"/>
<!--PayPal Payments Pro Settings -->
<!--make sure you also set the PaymentProvider settings below
The below if for the ExpressCheckout
-->
<add key="PayPalAPIAccountName" value="business_api1.csk.c om"/>
<add key="PayPalAPIAccountPassw ord" value="commerce"/>
<add key="PayPalAPICertificate" value="csk.pfx"/>
<add key="PayPalAPICertificatio nPassword" value="commerce"/>
<!--PayPal Payments Standard Settings-->
<add key="PayPalPDTID" value="4wscjERBD3ik_E7hmrq VaXHilJTCe grJ5FJoglu ERPo8H9ixP skOmFXuQK8 "/>
</appSettings>
<!--this is for the DirectPay-->
<CommercePaymentProvider defaultProvider="PayPalPay mentProvid er">
<providers>
<clear/>
<add name="PayPalPaymentProvide r"
type="Commerce.Providers.P ayPalPayme ntProvider , Commerce.PaymentProvider"
serviceUserName="business_ api1.csk.c om"
servicePassword="commerce"
sslCertFile="csk.pfx"
sslCertPassword="commerce"
merchantID="me@myCompany.c om"
/>
</providers>
</CommercePaymentProvider>
<CommerceShippingProvider defaultProvider="SqlShippi ngProvider ">
<providers>
<clear/>
<add name="SqlShippingProvider"
type="Commerce.Providers.S qlShipping Provider, Commerce.ShippingProvider"
connectionStringName="Comm erceTempla te"/>
</providers>
</CommerceShippingProvider >
<CommerceTaxProvider defaultProvider="SqlTaxPro vider">
<providers>
<clear/>
<add name="SqlTaxProvider"
type="Commerce.Providers.S qlTaxProvi der, Commerce.TaxProvider"
connectionStringName="Comm erceTempla te"/>
</providers>
</CommerceTaxProvider>
<CommerceOrdersProvider defaultProvider="SqlOrders Provider">
<providers>
<clear/>
<add name="SqlOrdersProvider"
type="Commerce.Providers.S qlOrdersPr ovider, Commerce.OrdersProvider"
connectionStringName="Comm erceTempla te"/>
</providers>
</CommerceOrdersProvider>
<CommerceShoppingCartProvi der defaultProvider="SqlShoppi ngCartProv ider">
<providers>
<clear/>
<add name="SqlShoppingCartProvi der"
type="Commerce.Providers.S qlShopping CartProvid er, Commerce.ShoppingCartProvi der"
connectionStringName="Comm erceTempla te"/>
</providers>
</CommerceShoppingCartProv ider>
<CommerceCatalogProvider defaultProvider="SqlCatalo gProvider" >
<providers>
<clear/>
<add name="SqlCatalogProvider"
type="Commerce.Providers.S qlCatalogP rovider, Commerce.CatalogProvider"
connectionStringName="Comm erceTempla te"/>
</providers>
</CommerceCatalogProvider>
<connectionStrings>
<clear/>
<add name="CommerceTemplate"
connectionString="Data Source=.\SQLExpress;Integr ated Security=True;User Instance=True;AttachDBFile name=|Data Directory| CommerceDB .mdf" providerName="System.Data. SqlClient" />
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integr ated Security=True;User Instance=True;AttachDBFile name=|Data Directory| ASPNET.mdf " providerName="System.Data. SqlClient" />
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<roleManager enabled="true"/>
<membership defaultProvider="AspNetSql Membership Provider" userIsOnlineTimeWindow="15 " hashAlgorithmType=""
>
<providers>
<clear/>
<add connectionStringName="Loca lSqlServer "
enablePasswordRetrieval="f alse"
enablePasswordReset="true"
requiresQuestionAndAnswer= "true"
applicationName="/"
requiresUniqueEmail="false "
passwordFormat="Hashed"
maxInvalidPasswordAttempts ="5"
passwordAttemptWindow="10"
passwordStrengthRegularExp ression=""
minRequiredPasswordLength= "1"
minRequiredNonalphanumeric Characters ="0"
name="AspNetSqlMembershipP rovider"
type="System.Web.Security. SqlMembers hipProvide r, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a"/>
</providers>
</membership>
<anonymousIdentification enabled="true"/>
<authentication mode="Forms">
<forms name=".ASPNET" loginUrl="login.aspx" protection="All" timeout="30" path="/"/>
</authentication>
<authorization>
<allow users="?"/>
</authorization>
<profile automaticSaveEnabled="true ">
<!--
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Profile.S qlProfileP rovider" connectionStringName="Comm erceTempla teSQL"/>
</providers>
-->
<properties >
<group name="Commerce">
<!--shipping prefs-->
<add name="ShipFirst" type="System.String" allowAnonymous="true"/>
<add name="ShipLast" type="System.String" allowAnonymous="true"/>
<add name="ShipCity" type="System.String" allowAnonymous="true"/>
<add name="ShipAddress1" type="System.String" allowAnonymous="true"/>
<add name="ShipAddress2" type="System.String" allowAnonymous="true"/>
<add name="ShipState" type="System.String" allowAnonymous="true"/>
<add name="ShipZip" type="System.String" allowAnonymous="true"/>
<add name="ShipCountry" type="System.String" allowAnonymous="true"/>
<add name="ShipPhone" type="System.String" allowAnonymous="true"/>
<!--encrypted info-->
<add name="CCNumber" type="System.String" allowAnonymous="true"/>
<add name="CCType" type="System.String" allowAnonymous="true"/>
<add name="CCExpMonth" type="System.String" allowAnonymous="true"/>
<add name="CCExpYear" type="System.String" allowAnonymous="true"/>
<add name="CCAuthNumber" type="System.String" allowAnonymous="true"/>
</group>
<add name="First" type="System.String" allowAnonymous="true"/>
<add name="Last" type="System.String" allowAnonymous="true"/>
<add name="City" type="System.String" allowAnonymous="true"/>
<add name="Address1" type="System.String" allowAnonymous="true"/>
<add name="Address2" type="System.String" allowAnonymous="true"/>
<add name="State" type="System.String" allowAnonymous="true"/>
<add name="Zip" type="System.String" allowAnonymous="true"/>
<add name="Country" type="System.String" allowAnonymous="true"/>
<add name="Phone" type="System.String" allowAnonymous="true"/>
</properties>
</profile>
<compilation debug="true">
<assemblies>
<add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D 50A3A"/></ assemblies ></compila tion>
<pages styleSheetTheme="White" />
</system.web>
<system.net>
<mailSettings>
<smtp from="me@email.com">
<network host="my.email.com" password="password" userName="username" />
</smtp>
</mailSettings>
</system.net>
</configuration>
-------------------------- ---------- ---------- ---------- ---------- -------
And yes, there is only one web.config in this directory!
Thanks again
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="CommerceDataProvider
<section name="CommerceOrdersProvid
<section name="CommerceShoppingCart
<section name="CommerceCatalogProvi
<section name="CommerceTaxProvider"
<section name="CommerceShippingProv
<section name="CommercePaymentProvi
</configSections>
<appSettings>
<!--PayPal Settings-->
<add key="SimpleTaxRate" value="0.0825"/>
<add key="BusinessEmail" value="business@csk.com"/>
<add key="RequireShipping" value="True"/>
<add key="RequireLogin" value="checkout"/>
<add key="SecureURL" value="http://localhost/pp2/"/>
<add key="SiteURL" value="http://localhost/pp2/"/>
<add key="ShipFromZip" value="96960"/>
<add key="ShowZeroInventoryItem
<!--the sandbox is PayPal's development server-->
<add key="UseSandbox" value="False"/>
<add key="UseDirectPay" value="True"/>
<!--setting this to true will override DirectPay-->
<add key="UsePayPalPaymentsStan
<!--this is the currency code that will be sent to process the transaction
valid codes are "USD" (us dollar), "EUR" (euro), "GBP" (Brit pound), JPY (Japanese yen) etc.
-->
<add key="CurrencyCode" value="EUR"/>
<!--PayPal Payments Pro Settings -->
<!--make sure you also set the PaymentProvider settings below
The below if for the ExpressCheckout
-->
<add key="PayPalAPIAccountName"
<add key="PayPalAPIAccountPassw
<add key="PayPalAPICertificate"
<add key="PayPalAPICertificatio
<!--PayPal Payments Standard Settings-->
<add key="PayPalPDTID" value="4wscjERBD3ik_E7hmrq
</appSettings>
<!--this is for the DirectPay-->
<CommercePaymentProvider defaultProvider="PayPalPay
<providers>
<clear/>
<add name="PayPalPaymentProvide
type="Commerce.Providers.P
serviceUserName="business_
servicePassword="commerce"
sslCertFile="csk.pfx"
sslCertPassword="commerce"
merchantID="me@myCompany.c
/>
</providers>
</CommercePaymentProvider>
<CommerceShippingProvider defaultProvider="SqlShippi
<providers>
<clear/>
<add name="SqlShippingProvider"
type="Commerce.Providers.S
connectionStringName="Comm
</providers>
</CommerceShippingProvider
<CommerceTaxProvider defaultProvider="SqlTaxPro
<providers>
<clear/>
<add name="SqlTaxProvider"
type="Commerce.Providers.S
connectionStringName="Comm
</providers>
</CommerceTaxProvider>
<CommerceOrdersProvider defaultProvider="SqlOrders
<providers>
<clear/>
<add name="SqlOrdersProvider"
type="Commerce.Providers.S
connectionStringName="Comm
</providers>
</CommerceOrdersProvider>
<CommerceShoppingCartProvi
<providers>
<clear/>
<add name="SqlShoppingCartProvi
type="Commerce.Providers.S
connectionStringName="Comm
</providers>
</CommerceShoppingCartProv
<CommerceCatalogProvider defaultProvider="SqlCatalo
<providers>
<clear/>
<add name="SqlCatalogProvider"
type="Commerce.Providers.S
connectionStringName="Comm
</providers>
</CommerceCatalogProvider>
<connectionStrings>
<clear/>
<add name="CommerceTemplate"
connectionString="Data Source=.\SQLExpress;Integr
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integr
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<roleManager enabled="true"/>
<membership defaultProvider="AspNetSql
>
<providers>
<clear/>
<add connectionStringName="Loca
enablePasswordRetrieval="f
enablePasswordReset="true"
requiresQuestionAndAnswer=
applicationName="/"
requiresUniqueEmail="false
passwordFormat="Hashed"
maxInvalidPasswordAttempts
passwordAttemptWindow="10"
passwordStrengthRegularExp
minRequiredPasswordLength=
minRequiredNonalphanumeric
name="AspNetSqlMembershipP
type="System.Web.Security.
</providers>
</membership>
<anonymousIdentification enabled="true"/>
<authentication mode="Forms">
<forms name=".ASPNET" loginUrl="login.aspx" protection="All" timeout="30" path="/"/>
</authentication>
<authorization>
<allow users="?"/>
</authorization>
<profile automaticSaveEnabled="true
<!--
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Profile.S
</providers>
-->
<properties >
<group name="Commerce">
<!--shipping prefs-->
<add name="ShipFirst" type="System.String" allowAnonymous="true"/>
<add name="ShipLast" type="System.String" allowAnonymous="true"/>
<add name="ShipCity" type="System.String" allowAnonymous="true"/>
<add name="ShipAddress1" type="System.String" allowAnonymous="true"/>
<add name="ShipAddress2" type="System.String" allowAnonymous="true"/>
<add name="ShipState" type="System.String" allowAnonymous="true"/>
<add name="ShipZip" type="System.String" allowAnonymous="true"/>
<add name="ShipCountry" type="System.String" allowAnonymous="true"/>
<add name="ShipPhone" type="System.String" allowAnonymous="true"/>
<!--encrypted info-->
<add name="CCNumber" type="System.String" allowAnonymous="true"/>
<add name="CCType" type="System.String" allowAnonymous="true"/>
<add name="CCExpMonth" type="System.String" allowAnonymous="true"/>
<add name="CCExpYear" type="System.String" allowAnonymous="true"/>
<add name="CCAuthNumber" type="System.String" allowAnonymous="true"/>
</group>
<add name="First" type="System.String" allowAnonymous="true"/>
<add name="Last" type="System.String" allowAnonymous="true"/>
<add name="City" type="System.String" allowAnonymous="true"/>
<add name="Address1" type="System.String" allowAnonymous="true"/>
<add name="Address2" type="System.String" allowAnonymous="true"/>
<add name="State" type="System.String" allowAnonymous="true"/>
<add name="Zip" type="System.String" allowAnonymous="true"/>
<add name="Country" type="System.String" allowAnonymous="true"/>
<add name="Phone" type="System.String" allowAnonymous="true"/>
</properties>
</profile>
<compilation debug="true">
<assemblies>
<add assembly="System.Security,
<pages styleSheetTheme="White" />
</system.web>
<system.net>
<mailSettings>
<smtp from="me@email.com">
<network host="my.email.com" password="password" userName="username" />
</smtp>
</mailSettings>
</system.net>
</configuration>
--------------------------
And yes, there is only one web.config in this directory!
Thanks again
Okay good news.... your web.config looks fine...
Bad news... Why are you having this problem?
Are you sure your application is marked as an application in IIS? Are you trying to rwite files or anything like that?
Still looking but try these two for now.
Bad news... Why are you having this problem?
Are you sure your application is marked as an application in IIS? Are you trying to rwite files or anything like that?
Still looking but try these two for now.
Also try running the app locally from the prod server and see what it says. Might help narrow it down.
Looking around it seems to happen to some unlucky person every now and then...
Looking around it seems to happen to some unlucky person every now and then...
ASKER
Sorry for so much problems. You saw the web.config, and this is the url: http://e-commerce.eport.at/default.aspx and this is the setting on the remote server:
http://e-commerce.eport.at(Current IIS Virutal Direction)
Such a unique problem ....:(
http://e-commerce.eport.at(Current IIS Virutal Direction)
Such a unique problem ....:(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yep! This is: http://e-commerce.eport.at/README.htm -and I set it also as an Application (Thanks for the hint).
But the vexatious runtime error doesn't disappear, It seems to be a vicious circle! If I just could get ride of this error page and see where the problem is occuring?
Think better to try to go through the real application. Many, many thanks for your kind helps,
But the vexatious runtime error doesn't disappear, It seems to be a vicious circle! If I just could get ride of this error page and see where the problem is occuring?
Think better to try to go through the real application. Many, many thanks for your kind helps,
So is it still not working?
ASKER
Unfortunately NO! I hope I will find the error of the application and will get ride of this mystique error page.
Regards
Regards
Hmm you shouldn't have accepted my answer then if it doesn't work.
I am 90% sure it has something to do with your permissions on the remote server.
try running aspnet_regiis -i inthe command line and then
try running iisreset in the command line
I am 90% sure it has something to do with your permissions on the remote server.
try running aspnet_regiis -i inthe command line and then
try running iisreset in the command line
ASKER
O YES! Of course, main thing you helped me further. I got some valuable hints and tips from you! All them are more worth than points;)
aspnet_regiis -i -->'aspnet_regiis -i' is not recognized as an internal or external command, operatable programm or batch file.
isreset --> IIS restarted successfully!
I run this commands on my local machine (should I do them somewhere else?).
Now I granted the full promission to ASPNET and also everyone to the whole e-commerce folder. I don't know what else could be set?
Now it is set as an application, is a virtual directory and there is full promission. What else could be set there?
aspnet_regiis -i -->'aspnet_regiis -i' is not recognized as an internal or external command, operatable programm or batch file.
isreset --> IIS restarted successfully!
I run this commands on my local machine (should I do them somewhere else?).
Now I granted the full promission to ASPNET and also everyone to the whole e-commerce folder. I don't know what else could be set?
Now it is set as an application, is a virtual directory and there is full promission. What else could be set there?
aspnet_regiis -i needs to be run from inside the framework folder. Sorry should have specified that
c:\WINDOWS\Microsoft.NET\F ramework\v 2.0.50727
You are using v2 right?
Make sure that in IIS under properties for your virtual directory that there is a tab called ASP.NET and that v2 is selected.
c:\WINDOWS\Microsoft.NET\F
You are using v2 right?
Make sure that in IIS under properties for your virtual directory that there is a tab called ASP.NET and that v2 is selected.
Hey congrats, what was the problem in the end? I see the error now?
ASKER
YEEEES!!!!!!!!!!! that was it! The net version on the server for this directory was 1.1! I changes it to v2.0.50727!
Now I can see the error cause.
Many many ..., thanks for your kind help.
Wish you a very great day and thanks again!
Regards
Now I can see the error cause.
Many many ..., thanks for your kind help.
Wish you a very great day and thanks again!
Regards
No problem, I'm glad I found it because I like to earn my points :)...
If you don't get the next error fixed just post a new question and we can work on it again....
If you don't get the next error fixed just post a new question and we can work on it again....
<!--
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="GenericEr
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm
</customErrors>
-->
You then change it to "Off" and forget to remove the --> to above the <customErrors tag.
Try that first....