0

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?

8
  • You've got two problems and when you solve the connection string problem the java script problem appears. It seems unlikely they are related and I would create a new question regarding the js problems. Commented Jul 24, 2013 at 6:47
  • the second problem occurred when the connection problem solved , and also it just occurred when load on server , but it worked good on local Commented Jul 24, 2013 at 6:53
  • 1
    There is another ConnectionString having the same name with your connectionString in the connection pool. Maybe you should check you IIS connection pool. Commented Jul 24, 2013 at 6:58
  • It seems to me there is framework issue, Make sure you have same framework on local as well on server machine. Also make sure your SP installed :) Commented Jul 24, 2013 at 7:13
  • @Phong Vo thank you. yes i have the same connection string name in my pool. But the second err didn't solve.I should instal framework 4.5. Maybe become true. Commented Jul 24, 2013 at 7:43

1 Answer 1

1

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" />
Sign up to request clarification or add additional context in comments.

4 Comments

at first my framework version was 4.5 and server was 4. i changed my web site framework from 4.5 to 4. do you think the reason of my problem is this?
@hony Could be the problem, please check <assemblies> section of your local web.config if it refers to correct version of System.Web.Extensions.dll.
if your webserver has 4.5 available change its framework version to 4.5.
if you can provide full stack trace here. Need to identify which code is calling this method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.