Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,


I have a DLL which refers a web service and that DLL is referenced in website i want to configure my web service url from my web site web.config how this could be possible from site
how could i add a dll.config settings to web.config of website.
C#
<applicationSettings>
    <SSOLib.Properties.Settings>
      <setting name="SSOLib_AuthService_AuthService" serializeAs="String">
        <value>http://localhost:8080/AuthService.asmx</value>
      </setting>
    </SSOLib.Properties.Settings>
  </applicationSettings><pre lang="c#">
Posted
Updated 21-Apr-14 23:49pm
v3
Comments
VICK 22-Apr-14 6:19am    
1- Create ASP .NET Folder "App_WebReference"
2-Right Click on this folder and click on "Add Web Reference"

it will automatically add your webservices reference in Web.Config
[no name] 22-Apr-14 6:32am    
that web refernce is referenced in Dll and that dll is refernecd web application

1 solution

You need to write something like:
<configuration>
   <runtime>
      <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentassembly>
            <assemblyidentity name="myAssembly">
                              publicKeyToken="32ab4ba45e0a69a1"
                              culture="neutral" />
            <bindingredirect oldversion="1.0.0.0">
                             newVersion="2.0.0.0"/>
            <codebase version="2.0.0.0">
                      href="http://www.litwareinc.com/myAssembly.dll"/>
         </codebase></bindingredirect></assemblyidentity></dependentassembly>
      </assemblybinding>
   </runtime>
</configuration>


For more information visit:
http://msdn.microsoft.com/en-us/library/twy1dw1e.aspx
 
Share this answer
 
Comments
[no name] 22-Apr-14 5:56am    
but how can i pass web service url .you did not specify any web url here.please suggest.
Snesh Prajapati 22-Apr-14 6:52am    
if you are talking about endpoint(tag, where you need to write the address.. of the service) for web service:
Visit:
http://stackoverflow.com/questions/1317982/how-to-config-clients-for-a-wcf-service
Hope it will help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900