Solved

Web Service - Without Precompile

Posted on 2007-03-30
7
593 Views
Last Modified: 2008-01-09
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?
0
Comment
Question by:_TAD_
  • 3
  • 2
  • 2
7 Comments
 
LVL 3

Expert Comment

by:Nico
ID: 18827371
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...
0
 
LVL 22

Author Comment

by:_TAD_
ID: 18828424
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.
0
 
LVL 3

Accepted Solution

by:
Nico earned 250 total points
ID: 18828464
Hm, I guess you have to precompile anyway then. As far as I know the 1.1 framework doesn't doe on-the-fly compiling.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 22

Author Comment

by:_TAD_
ID: 18828514
aspx 1.1 supports non-compiled web pages.  A web service is just a different type of web page.


I'll keep looking.
0
 
LVL 12

Expert Comment

by:ShazbotOK
ID: 18836256
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.
0
 
LVL 22

Author Comment

by:_TAD_
ID: 18836386
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).
0
 
LVL 12

Assisted Solution

by:ShazbotOK
ShazbotOK earned 250 total points
ID: 18836431
I still stand on the "compile the code and import the assembly" - as this is the best method to use... (security or no security) and technically no the ASMX pages are not a "webpage" ...  if you open the ASMX into designer mode you will be able to note that it is only a "placeholder" so that the IIS knows to listen for that http request.. all communications are interpreted and sent to the aspnet_wp.exe listner wich calls the appropriate assembly.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Visual Studio search word table and return Cell index 8 37
C# Export DataGridView 4 38
Create XML 5 31
Spacing between controls 4 16
While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now