473,670 Members | 2,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security question about IIS and Cassini

Ian
I am developing a .NET Web Service that acts as a thin calling layer for a
larger object. Thus the larger object runs in the context of the web service
that is calling it, and is therefore subject to the security restrictions of
the Web Server the web service is run through.

All well and good. At the end of the main method call of the larger object,
it instantiates and calls (through a RCW) a method of a legacy COM object
that writes data away to a legacy system whose files are located completely
seperately from the virtual directory of the web service - part of the normal
file system in other words.

The only problem being that IIS will not allow this method to work, in fact
it refuses to call it. However, when the Web Service is called through
Cassini, with its much less stringent security, it allows the legacy DLL to
work no problem and the app works fine.

Running the same DLL through IIS (both 5.0 and 6.0) causes spurious errors
to happen - on 6.0 on our test server I get an InvalidCastExce ption on the
Com interop, when running it on my development workstation using IIS 5.0 I
get an SOAP exception that says it expected a respone of type "text/xml" when
it got "text/xml";encoding UTF-8' (or words to that effect).

I suspect these are caused in some way by security using IIS. But how do I
configure IIS so that my Web Site is able to run a DLL that writes to a
directory completely outside the virtual directory structure of the web
application? I have tried using ordinary Windows Permissions/Security to
allow the Local Service/Network Service accounts to modify and write (r even
execute) in the non-virtual legacy system's home directory, but IIS still
appears to stop it and generate these odd errors.

Any ideas? Under Cassini it all works fine, but Cassini is no good for a
production web server, or even a proper test.
Nov 1 '06 #1
1 1857
You are dealing is OS issues here.
When using Casini, the process is owned by the account in which VS is
started. That most often will be yourself (I assume you are administrator,
like most developers sadly are !), hence you can access the dll's.

IIS 5.x is running (and accesing the HD!) in the context of the account
ASPNET.
IIS 6.0 is running (and accessing the HD!) in the context of the app.pool to
which it is configured. By default this would be local service. The local
service does not have permission to access files outside the virtual
directory. Neither does ASPNET.

What to do?
Configure your IIS to run with another local or domain account that indeed
does have read/write access to the folder in question. That should solve your
mistory.
--
rgds.
/Claus Konrad
MCSD.NET (C#)
"Ian" wrote:
I am developing a .NET Web Service that acts as a thin calling layer for a
larger object. Thus the larger object runs in the context of the web service
that is calling it, and is therefore subject to the security restrictions of
the Web Server the web service is run through.

All well and good. At the end of the main method call of the larger object,
it instantiates and calls (through a RCW) a method of a legacy COM object
that writes data away to a legacy system whose files are located completely
seperately from the virtual directory of the web service - part of the normal
file system in other words.

The only problem being that IIS will not allow this method to work, in fact
it refuses to call it. However, when the Web Service is called through
Cassini, with its much less stringent security, it allows the legacy DLL to
work no problem and the app works fine.

Running the same DLL through IIS (both 5.0 and 6.0) causes spurious errors
to happen - on 6.0 on our test server I get an InvalidCastExce ption on the
Com interop, when running it on my development workstation using IIS 5.0 I
get an SOAP exception that says it expected a respone of type "text/xml" when
it got "text/xml";encoding UTF-8' (or words to that effect).

I suspect these are caused in some way by security using IIS. But how do I
configure IIS so that my Web Site is able to run a DLL that writes to a
directory completely outside the virtual directory structure of the web
application? I have tried using ordinary Windows Permissions/Security to
allow the Local Service/Network Service accounts to modify and write (r even
execute) in the non-virtual legacy system's home directory, but IIS still
appears to stop it and generate these odd errors.

Any ideas? Under Cassini it all works fine, but Cassini is no good for a
production web server, or even a proper test.
Nov 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4317
by: J. Muenchbourg | last post by:
I'm trying to install the Cassini WebServer on my Windows xp with .net framework, but the below instructions to get the webserver running after downloading the .exe doesnot make any sense at all: ------------ Instructions ------------ Go to the directory containing the above files (setup to use c# compiler and gacutil utility). Run 'build.bat', it will:
5
2782
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE ------------------------------------------------------------------------------- -
3
1663
by: Daniel Wang | last post by:
Are there alternate locations to download the Cassini ASP.NET web server? The download link on www.asp.net seems broken: http://www.asp.net/Projects/Cassini/Download/download.aspx?tabindex=0&tabid=1 Thanks.
2
1162
by: jai hanuman | last post by:
somebody please help me install VS .NET with asp.net on XP home edition. I installed cassini but the VS won't install asp.net - it says it needs IIS. i've heard cassini can be used instead of IIS, could anyone post the steps please. thanks
5
1421
by: Randall Parker | last post by:
Running XP Home which does not come with IIS. In response to advice received on this forum I installed the Cassini web server to serve in place of IIS. See here for Cassini: http://www.asp.net/Projects/Cassini/Download/Default.aspx?tabindex=0&tabid=1 Trying to create an asp.net project in VS 2003. When I try to create the problem I get this error: "The default Web access mode for this project is set to file share, but the project...
5
5296
by: NonNB | last post by:
Apols for the post here, but there is no public.inetserver.cassini Is there a way to configure the cassini / ASP NET Development web server: 1) So that the port can be pegged (seems to be random)? 2) So that can access the server using hostname other than localhost? I need to test some client side SOAP calls Thanks in advance
4
2228
by: Anbu | last post by:
Hi All, I'm using the Cassini component in my desktop application to create a web site to host the web services. The application works fine in normal scenario. If the system is kept idle for some time, the application getting terminated with the following error: Unhandled Exception : An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Send(Byte buffer, Int32 offset, Int32
4
2940
by: yancheng.cheok | last post by:
Hello all, I have a web application, which I had developed few years ago with ASP .NET 1.1 Today, I would like to deploy the web application to client, using ASP .NET 2.0 + UltiDev Cassini 2.0 I locate my whole project in a folder named C:\website\GOWatch
6
2788
by: R.A.M. | last post by:
Hello, I have problem with IIS 5.1 - it ceased to function. So I downloaded and installed Cassini Web Server and uninstalled IIS in my Windows XP Professional. The problem is that I cannot successfully run Cassini. I entered application directory F:\Inetpub\wwwroot, server port 80, virtual root / and I pressed Start button. Then message box appers: Cassini Managed Web Server failed to start listening on port 80. Possible conflict with...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8903
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5684
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2042
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.