简体   繁体   中英

How is the web application and webservice compiled?

I have followed this example: http://www.tutorialspoint.com/webservices/web_services_examples.htm

In this example it is mentioned that the web application you first have to create a web proxy using WSDL .NET SDK. The next thing is to compile the proxy using the CSC /t:library, so for what I understand the web application used the CSC to be compiled, however the web service is never touched again.

Since it's written in C#, saved in a virtual directory of IIS7 and using the noteblock, I have no idea of how it's compiling the web server.

Could someone tell and if possible explain which compiler is being used for this example, using the ASP.NET technology?

It depends how your application is deployed. It sounds like you aren't using VS to compile the code before deploying it, in which case you are presumably deploying the source code generated by the WSDL proxy generation utility directly to the website (in an App_Code folder)?

ASP.net on your web server will automatically compile these files (using CSC).

http://msdn.microsoft.com/en-us/library/t990ks23(v=vs.80).aspx

The alternative is you compile the files locally on your development machine and just upload the assemblies. Then obviously CSC locally is doing the compiling. In this case you'd typically put the files created by the WSDL proxy generation utility into a separate VS project and compile a class library.

I believe you can also drop a .wsdl file directly into App_Code and ASP.net on the server will automatically create and compile a proxy using an appropriate compiler (either the language used by other files in the same folder or the default compiler specified in the site or machine config). Doesn't sound like you're doing this and it's not something I've ever done - but it's worth knowing about.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM