Link to home
Start Free TrialLog in
Avatar of MikeCombe
MikeCombeFlag for United States of America

asked on

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?
Avatar of ErezMor
ErezMor
Flag of Australia image

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
Avatar of MikeCombe

ASKER

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....

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
it's on a shared server....no direct access by me.
I can put a try-catch & get the error
you do have the codefile.vb or cs file in appcode folder, right?
could you send some code of your web service?
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?
ASKER CERTIFIED SOLUTION
Avatar of ErezMor
ErezMor
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial