Link to home
Start Free TrialLog in
Avatar of _TAD_
_TAD_

asked on

Web Service - Without Precompile

I know that aspx pages can be deployed so that they compile at run time.

<%@ WebPage Source="WebPage.aspx.cs" %@>  (or something like that).


I want to do the same thing with a web service.  I want to put the source code in the IIS directory and make a slight change to it - and have that change take affect without re-compiling everything.


Here are the contents of my current asmx page:

<%@ WebService Language="c#" CodeBehind="SecurityAccess.asmx.cs" Class="JournalSentinel.WorkflowGen.WebService.SecurityAccess" %>

how can I change this to compile at runtime instead of being pre-compiled?
Avatar of Nico
Nico
Flag of Netherlands image

instead of publishing the webservice, just copy the files to whatever location you want the project to be. .net will always compile stuff on the fly...
Avatar of _TAD_
_TAD_

ASKER

That works for .Net 2.0 applications, but I'm afraid this web service was initially compiled in .Net 1.1


In a nutshell, I was told to make a trivial change to the web service (changing an xml field name).  The problem I have is that I suspect before this is all done another 2 fied names will change and I don't want to recompile it for these trivial changes.
ASKER CERTIFIED SOLUTION
Avatar of Nico
Nico
Flag of Netherlands 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
Avatar of _TAD_

ASKER

aspx 1.1 supports non-compiled web pages.  A web service is just a different type of web page.


I'll keep looking.
Honestly to allow the source files to be resident on a production server is dangerous.. this means any malicious access can be used to control your code.

better practice is to complile the Web Service methods and deploy (or copy) the DLL to the bin directory on production.   IIS will detect that the assembly has changed and reload it when it is accessed.
Avatar of _TAD_

ASKER

Security is not an issue.  This is not an outward facing web service.  If someone has gotten far enough into our environment to affect this web service, we have bigger problems then who authorized my vacation time (which is the purpose of the web service).
SOLUTION
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