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?

Community
  • 1
  • 1
H.Ghassami
  • 1,012
  • 2
  • 21
  • 42
  • 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. – faester Jul 24 '13 at 06: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 – H.Ghassami Jul 24 '13 at 06: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. – Phong Vo Jul 24 '13 at 06: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 :) – Rajeev Bera Jul 24 '13 at 07:13
  • [@Phong Vo](http://stackoverflow.com/users/2197797/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. – H.Ghassami Jul 24 '13 at 07:43
  • [@Microtechie](http://stackoverflow.com/users/2440114/microtechie): I told that i changed the framework in my project by right click on it and change target frame work from 4.5 to 4.and the server target framework is 4.and SP was installed. – H.Ghassami Jul 24 '13 at 07:46
  • please show the section of your web.config file – R.C Jul 24 '13 at 08:15
  • the err of connection is solve but the second err not, Method not found: 'System.Web.UI.ScriptResourceDefinition System.Web.UI.ScriptResourceMapping.GetDefinition(System.String)'. – H.Ghassami Jul 24 '13 at 09:08

1 Answers1

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" />
Taimur Khan
  • 531
  • 8
  • 21
  • 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? – H.Ghassami Jul 24 '13 at 06:58
  • @hony Could be the problem, please check section of your local web.config if it refers to correct version of System.Web.Extensions.dll. – Taimur Khan Jul 24 '13 at 07:20
  • 1
    if your webserver has 4.5 available change its framework version to 4.5. – Taimur Khan Jul 24 '13 at 07:21
  • if you can provide full stack trace here. Need to identify which code is calling this method. – Taimur Khan Jul 24 '13 at 09:01