• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 805
  • Last Modified:

How to publish ASMX to website server

Using VS2005 I created a web project, asmx & default.aspx file.
Works great on the design pc.
Now I want to publish it to my public website, on an external server.

If I do a straight VS05 publish, the code contains reference to the asmx file on my design pc.
That is the wrong asmx file. It should be the asmx file on the external server.
If I do an FTP copy of the asmx file, then try to add a "Web Reference" in my project, I get an error.....probably because the asmx file was just "copied" and not compiled.

What steps do I need to take to get the project published?
0
MikeCombe
Asked:
MikeCombe
  • 4
  • 3
1 Solution
 
ErezMorCommented:
both ways for copying manually and using the publish wizard should work. AND using the asmx directly shpould work fine, too, you dont HAVE to compile in order to use the web service.
the web service iacts as a web-site on the server, so copy the whole folder structure (web.config file, app data, and appcode folders etc...), and make a web-site out of them in iis on the server
after that you can create the web-reference you need in the other application
ask if you need more specifics
erez
0
 
MikeCombeAuthor Commented:
Thanks erez,

That's what I thought. However.....it all works great on my design pc.....but not when I do the FTP upload.

Using a web browser to look at my ASMX file, gets this error....
Exception Details: System.InvalidOperationException: Request format is unrecognized.

Using a web browser to look at my default.ASPX file, gets this error....
Compiler Error Message: BC30002: Type ABC.Test' is not defined.

I am missing something....

0
 
ErezMorCommented:
open the asmx file in a web browser ON THE SERVER (in rdp, if you have access) so you'll see the actual error, or add some try-catch and save the exact error
do you have access to the iis on the server?
are you using a user-defined type? this caused me some trouble before,.. if so, try using a standard type instead, and "directcast" it to whatever you want on each end
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
MikeCombeAuthor Commented:
it's on a shared server....no direct access by me.
I can put a try-catch & get the error
0
 
ErezMorCommented:
you do have the codefile.vb or cs file in appcode folder, right?
could you send some code of your web service?
0
 
MikeCombeAuthor Commented:
I started all over with just a plain test.
test.asmx
only has "Hello World"
The VS05 project only shows a test1.asmx
However, when I go to my FTP client, I see test1.asmx and test1.asmx.vb
no bin folder in the project.
Shouldn't I just have to upload the test1.asmx file?
0
 
ErezMorCommented:
no
the asmx file is the "front gate" showing the world the service, but the actual things you write (incuding "hello world" that is automatically created for you) and "happen" by the service are all in the vb file
if you have experience with aspx pages, it's the same with their code-behind vb files
and their place is in the appcode folder on the server
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now