Solved

Web Service - Without Precompile

Posted on 2007-03-30
7
600 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_
[X]
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
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

730 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