Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Web Service - Without Precompile

Posted on 2007-03-30
7
599 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 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