Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Web Service Reference in Asp.net (WSE 2.0)

Web Service Reference in Asp.net (WSE 2.0)

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netsysadmin
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mark_me
    wrote on last edited by
    #1

    Hi, i have a windows services that uses a service reference to amazon web service. I have created a dll that actually has the service reference and the dll is called by my windows service. My windows service works fine. I also have a local asp.net application that uses the same dll and works great (Probably because dll and asp.net application are created on same machine). Recently, i moved the asp.net application to LAN Server. I copied the dll into bin folder. I also copied the service reference folder to bin folder and it turns out that the asp.net application is not using the service reference. It is calling my dll but the dll inturn isn't using the service reference. Can anybody please provide help on where should i copy the service reference folder or files. or wat approach i should take to solve this issue. I googled but it seems that i am not googling appropriate keywords. Any help, link etc will be highly appreciated Thanks Mark

    A 1 Reply Last reply
    0
    • M mark_me

      Hi, i have a windows services that uses a service reference to amazon web service. I have created a dll that actually has the service reference and the dll is called by my windows service. My windows service works fine. I also have a local asp.net application that uses the same dll and works great (Probably because dll and asp.net application are created on same machine). Recently, i moved the asp.net application to LAN Server. I copied the dll into bin folder. I also copied the service reference folder to bin folder and it turns out that the asp.net application is not using the service reference. It is calling my dll but the dll inturn isn't using the service reference. Can anybody please provide help on where should i copy the service reference folder or files. or wat approach i should take to solve this issue. I googled but it seems that i am not googling appropriate keywords. Any help, link etc will be highly appreciated Thanks Mark

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Well, whenever you add reference to a web service, Visual Studio will add one settings file and create the entry to it which points to the web service location. It may also create one entry to Web.config. Have a look if you have this configured properly for your compiled assembly. :) :)

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Microsoft Bing MAP using Javascript
      CLR objects in SQL Server 2005
      Uncommon C# Keywords
      /xml>

      M 1 Reply Last reply
      0
      • A Abhishek Sur

        Well, whenever you add reference to a web service, Visual Studio will add one settings file and create the entry to it which points to the web service location. It may also create one entry to Web.config. Have a look if you have this configured properly for your compiled assembly. :) :)

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Microsoft Bing MAP using Javascript
        CLR objects in SQL Server 2005
        Uncommon C# Keywords
        /xml>

        M Offline
        M Offline
        mark_me
        wrote on last edited by
        #3

        Hmmm... , on my local machine i added the reference to dll (ie my dll) thru website->add reference, whereas on the server, i just placed my dll in bin folder because i thought that should be enuf. On my local machine, i didn't make any change to add service reference so i believe web.config should have not changed... Am not sure about settings file though... It seems that by adding reference thru website->add reference, asp.net on my local machine knows where to find the service reference files but when added to only bin, asp.net doesnot know whre to get service reference from ... Is there anyother way of adding reference on server? I have tried placing the files everywhere on server but it isn't working... I need to see the web.config file ... Thanks for replying

        A 1 Reply Last reply
        0
        • M mark_me

          Hmmm... , on my local machine i added the reference to dll (ie my dll) thru website->add reference, whereas on the server, i just placed my dll in bin folder because i thought that should be enuf. On my local machine, i didn't make any change to add service reference so i believe web.config should have not changed... Am not sure about settings file though... It seems that by adding reference thru website->add reference, asp.net on my local machine knows where to find the service reference files but when added to only bin, asp.net doesnot know whre to get service reference from ... Is there anyother way of adding reference on server? I have tried placing the files everywhere on server but it isn't working... I need to see the web.config file ... Thanks for replying

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          Well, Visual studio always does some tricky things which are hidden from normal users. Say if you are adding a web reference in class library, it will produce one App.config file and place the config entries there. If you reference the dll from your website, the final build will merge the entries of all the class libraries referenced to its web.config. Thus you will find the Web reference working perfectly. This is just to allow everything configurable. Such that, if you change your server, changing just the config path will do. On your machine, if you do reference the assembly through Visual Studio, it will automatically change configuration and make alteration so that your project works. If you want this by Copying the bin folder, you need to manually change the config file yourself to make it work. :)

          Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


          My Latest Articles-->** Microsoft Bing MAP using Javascript
          CLR objects in SQL Server 2005
          Uncommon C# Keywords
          /xml>

          M 1 Reply Last reply
          0
          • A Abhishek Sur

            Well, Visual studio always does some tricky things which are hidden from normal users. Say if you are adding a web reference in class library, it will produce one App.config file and place the config entries there. If you reference the dll from your website, the final build will merge the entries of all the class libraries referenced to its web.config. Thus you will find the Web reference working perfectly. This is just to allow everything configurable. Such that, if you change your server, changing just the config path will do. On your machine, if you do reference the assembly through Visual Studio, it will automatically change configuration and make alteration so that your project works. If you want this by Copying the bin folder, you need to manually change the config file yourself to make it work. :)

            Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


            My Latest Articles-->** Microsoft Bing MAP using Javascript
            CLR objects in SQL Server 2005
            Uncommon C# Keywords
            /xml>

            M Offline
            M Offline
            mark_me
            wrote on last edited by
            #5

            Hi ,thanks.. It seems that i need to look into all config files... I will let you know if i am not able to solve the problem... Thanks Mark

            A 1 Reply Last reply
            0
            • M mark_me

              Hi ,thanks.. It seems that i need to look into all config files... I will let you know if i am not able to solve the problem... Thanks Mark

              A Offline
              A Offline
              Abhishek Sur
              wrote on last edited by
              #6

              mark_me wrote:

              I will let you know if i am not able to solve the problem...

              Sure budd.. :thumbsup:

              Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


              My Latest Articles-->** Microsoft Bing MAP using Javascript
              CLR objects in SQL Server 2005
              Uncommon C# Keywords
              /xml>

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups