I have a website with .net framework 4 and telerik 2012, when i uploaded my web site on the server one of my page has this error.
The entry 'ConnectionString' has already been added.
for solving this err i use this solution:
<remove name="ConnectionString" />
and after this line ,define my connection in web config. but this err apear :
** Method not found: 'System.Web.UI.ScriptResourceDefinition System.Web.UI.ScriptResourceMapping.GetDefinition(System.String)'.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: Method not found:
'System.Web.UI.ScriptResourceDefinition
System.Web.UI.ScriptResourceMapping.GetDefinition(System.String)'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
**
{Note : this err just occurred on the server not in local }
and when i removed this line : <remove name="ConnectionString" /> the first err apear again : The entry 'ConnectionString' has already been added.
What can I do now?
Please check framework version on your web server, it should be 4.5. In 4.0 GetDefinition function do not have overload which accpet a string param only. Keep following entry in web.config as it has nothing to do with other error you are getting.
<remove name="ConnectionString" />
Related
I'm trying to upload my c# site,
The sites seems to upload correctly,
But when I try to enter, I get the next message:
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 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".
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Now I add the customErrors mode="Off" to my Web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<customErrors mode="Off"/>
</system.web>
</configuration>
And the new error is:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
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.
Source File: \blablablablablabla\public_html\myweb\web.config Line: 8
Version Information: Microsoft .NET Framework Version:2.0.50727.8793; ASP.NET Version:2.0.50727.8762
I tryed modifying it to 2.0 (because the error signature), also tryed to delete the targetFramework attribute, but nothing works.
Thaaaaanks.
Go to IIS,
Click on Application Pool--> on the right side --> Select your Site--> double click on it and change the .Net Framework to v4.0
I hope it will solve your problem.
Thnks.
I am stuck at this and cannot figure it out why it is not working. When i open my website it shows me this error.If you can help me I'll be grateful. It is giving error at membership line and i cannot figure it out why it is giving this error.It is giving the Configuration Error. Below is the description of the error.
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: 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.
Source Error:
Line 52: </controls>
Line 53: </pages>
Line 54: <membership>
Line 55: <providers>
Line 56: <!--
I have configured 'SessionAuthenticationModule' based on the instructions from http://www.wiktorzychla.com/2014/11/forms-authentication-revisited-for-net.html. My application is in .Net 3.5 so I changed the library mappings based on "Namespace Mapping between WIF 3.5 and WIF 4.5". When I run it, it is throwing the exception shown below.
"
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.IdentityModel.Web.SessionAuthenticationModule.InitializePropertiesFromConfiguration(String serviceName) +16
Microsoft.IdentityModel.Web.SessionAuthenticationModule.InitializeModule(HttpApplication context) +124
Microsoft.IdentityModel.Web.HttpModuleBase.Init(HttpApplication context) +30
"
Major configuration settings are shown below.
<section name="Microsoft.IdentityModel" type="Microsoft.IdentityModel.Configuration.SystemIdentityModelSection, Microsoft.IdentityModel"/>
<section name="Microsoft.IdentityModel.Protocols" type="Microsoft.IdentityModel.Web.Configuration.SystemIdentityModelServicesSection, Microsoft.IdentityModel.Protocols.WSFederation"/>
</configSections>
<Microsoft.IdentityModel></Microsoft.IdentityModel>
<Microsoft.IdentityModel.Protocols>
<federationConfiguration>
<cookieHandler requireSsl="false"/>
</federationConfiguration>
</Microsoft.IdentityModel.Protocols>
Anything wrong with my configurations? Please help me.
You seem to lack the SAM in web.config.
<httpModules>
<add name="SessionAuthenticationModule"
type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
Take a look at my old tutorial that aims at .NET 3.5
http://www.wiktorzychla.com/2011/08/quest-for-customizing-adfs-sign-ing-web.html
I'm receiving this error trying to show an ASP.NET web forms page in a folder in an ASP.NET MVC application. Am I missing an assembly reference or package?
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load type 'System.UI.Page'.
Source Error:
Line 324: </mobileControls>
Line 325:
Line 326: <pages pageBaseType="System.UI.Page" userControlBaseType="System.UI.UserControl">
Line 327: <namespaces>
Line 328: <add namespace="System" />
Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config Line: 326
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212
Page is not in System.UI. It's in System.Web.UI namespace, in the System.Web assembly. You should have System.Web referenced by default, so just fix the fully qualified name in your web.config. Same thing goes for UserControl class.
<pages pageBaseType="System.Web.UI.Page" userControlBaseType="System.Web.UI.UserControl">
I have written custom roleProvider for my Silverlight application.
Unfortunately I'm getting an error while loading:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Exception has been thrown by the target of an invocation.
Source Error:
Line 46: <providers>
Line 47: <clear />
Line 48: <add name="LanosRoleProvider" type="LANOS.Web.Security.LanosRoleProvider" applicationName="/" />
Line 49: </providers>
Line 50: </roleManager>
Source File: C:\path\LANOS\LANOS.Web\web.config Line: 48
This is definition of my role provider (class is inside Lanos.Web project):
namespace LANOS.Web.Security
{
public class LanosRoleProvider : RoleProvider
I have really no clue why this does not work. Before adding it to my application I've tested it on some sample projects and it worked fine. Any ideas?
Or at least could you tell me how to show that exception info which is being thrown at the time of config load?
What version of ASP.NET are you running?
I would suggest adding the assembly to the element like so if your assembly is LANOS.Web.Security:
<add name="LanosRoleProvider" type="LANOS.Web.Security.LanosRoleProvider, LANOS.Web.Security" applicationName="/" connectionStringName="abcConnectionString" />
UPDATED
connectionStringName is a required attribute which is why the message is a parse error. This also means you will have to define a connection string in the section.
<connectionStrings>
<add name="abcConnectionString" connectionString="blah" />
</connectionStrings>
Hope this helps.
Just ran into this problem and my problem was that I was using property injection for a service used by the Custom Roles Provider. This service also required its dependencies to be injected by constructor. I missed a binding of one of these constructor dependencies which caused this ambiguous error to be thrown. I tried explaining this on here.
I hope it helps people coming from google like I did.
This happened to me because an exception was thrown in the constructor of my RoleProvider.
Check your constructors call chain and and private member default assignments.
My particular issue was caused by a problem with EntityFramework in the constructor.
Clear out any constructor code in the provider and test to see if the error goes away and you'll know you are on the right track.