I have a classic ASP application that uses a custom written VB6 COM object (.dll) through Server.CreateObject.
I can deploy and run classic ASP (.asp) in an Azure web app, but I'm not sure how to get to the point where I can use my VB6 COM object.
Uploading the .dll to the web folder and using Server.CreateObject just results in the expected:
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
Is it possible to use your own custom .dlls?
That's not possible using Web Apps. Using Virtual Machines, you have more control and you'll be able to register your COM DLL.
Related
I have a very silly question, Can I create a Folder in Client machine from a web application. I have tried to do that.
But I am unable to do so. I have created an asp.net web application using visual studio IDE. And when I executed the web application using visual studio the folder is created.
After that I hosted the web application in IIS and the tried to access the web application. The web application was accessed successfully but the folder was not created on the client machine.
Could you please suggest me the ways of how to do it.
Thanks.
ASP.NET is a framework for creating web sites. The application using ASP.NET is deployed to a web server, for instance IIS. When ASP code behind of aspx/ascx files or C# code of external components is called it's executed on the web server (IIS).
I assume you have implemented the code for creating a folder with C# code. This code is, as I said, executed on server. On your development machine you have client (which is web browser) and server (whis is IIS) on the same machine. So the folder was created.
When you have deployed the application to a separate web server then you separated web server from client. I think your IIS hosted application has created a folder on the machine where IIS were installed. Not on your local machine.
If you want to create a folder on client side you shouldn't use C# ASP.NET code.
You should do some research how to achieve it in other technology. Here's some link for it - How to Create a New Folder for Downloading a File
I wrote a web service (c#, VS2012, windows7 64bit), which calls a COM dll.
Using visual studio, there was no problem to execute the web service and thus the client's application.
After trying to locate the web service in the IIS, all calls to the COM dll's function failed.
What could be the problem? Is there any specific configuration of the IIS for COM dlls?
Try to change the executing user of the app pool to a custom account instead of a built-in account. Try to run it as an administrator first and get it to work. Then try with a more restricted user account.
I changed Framework version from 3.5 to 4. then sloved.
ref: http://quickstartprojects.org/2011/11/webservicesindotnet4/
I am currently trying to migrate some websites from IIS6 to IIS7 and have run into a problem.
For the most part, my websites are written in Classic ASP. However, within one website I have two web applications running asp.net. Something like this
www.mywebsite1.com - Classic ASP
www.mywebsite2.com - Classic ASP
www.mywebsite2.com/MyAspDotNetApplication1 - ASP.NET 4.0
www.mywebsite2.com/SubDirectory/MyAspDotNetApplication2 - ASP.NET 4.0
www.mywebsite3.com - Classic ASP
...
When I browse the sites hosting Classic ASP pages I have no problems. If I access one of the ASP.NET web application everything is ok. If I then access the second ASP.NET web application things start going wrong I get errors on the ASP.NET application pages along the lines of
Failed to start monitoring changes to '\FileServer1\web\mywebsite2\MyAspDotNetApplication1\App_Browsers' because the network BIOS command limit has been reached. For more information on this error, please refer to Microsoft knowledge base article 810886. Hosting on a UNC share is not supported for the Windows XP Platform.`
When I try to access the Classic ASP web pages I get the following error
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Config Error
Config File
Requested URL http://www.mywebsite2.com:80/myvirtualdirectory1/
Physical Path \\FileServer1\web\mywebsite2\myvirtualdirectory1\
Logon Method Not yet determined
Logon User Not yet determined
When I open up IIS manager and take a look at one of the sites or virtual directories where the error is occurring I get the following error
Filename: \\?\FileServer1\mywebsite2\web.config
Error: Cannot read configuration file
The problems I am having is similar to this other question but I have removed all Web.config files from all my sites (excluding the ASP.NET applications) and I still get the error.
This worked fine on IIS6.
Any ideas?
Setup
Hardware
Two web servers (Web1 and Web2) running Windows Server 2008
One file server (FileServer1) running Windows 2003 (don't know if that makes a difference)
IIS
10 Classic ASP websites running in their own application pools. These websites all have lots of virtual directories pointing to locations on the file server
20 websites that simply redirect to one of the 10 websites above
2 ASP.NET applications that sit inside of one of the Classic ASP sites
The Classic ASP sites each have their own Application Pool which runs under a custom user account MYDOMAIN\MyIISUser
The ASP.NET applications also have their own Application Pools and are configured to run under the custom user account MYDOMAIN\MyIISUser
The 20 redirection websites run under a single Application Pool.
The websites are set up to use shared configuration. The configuration files are stored locally on each web server and are synchronized using DFS (I tried putting it on the FileServer1 but ran into the same problem as above, moving it to the web servers local file system solved the issue - This may be important?).
File Server
All web content is stored on the file server under C:\Web. This is set up as a UNC drive accessible from the network via the address \\FileServer1\Web
I have set the permissions on C:\Web to allow Read access for the MYDOMAIN\MyIISUser
I have been told that the web content must be stored on the network drive rather than have local copies and using DFS
It sounds like your ISAPI modules are not configured correctly on your classic ASP sites.
All .NET ISAPI filters should be disabled/disallowed and the classic ASP filter should be enabled.
It turns out that there is something wrong with the the fileserver. What the problem is I don't know. After creating a new clustered Windows Server 2008 fileserver I have not been able to replicate the problem.
I've created an ASP.NET web tool that will just be used by a few people in my team where I work. I deployed it on our internal (Win2k, IIS6) web server by creating a new website in IIS and assigning it port 81. Users can access it with an address like http://myserver:81. All the other web stuff on the server is classic ASP and is accessed with addresses like http://myserver/path/to/myfile.asp.
This works fine, but I'd rather set it up so that the ASP.NET app is not configured as a separate web site, and is just accessed via a folder path like the classic asp stuff. That way users wouldn't have to specify the port and we wouldn't get the overhead of an additional web site for every little ASP.NET app we make.
The problem is when I build the site in visual studio, it compiles all the .cs files into one .dll file, and if I just copy everything over to some folder on the server and type the address of the .aspx file, it can't seem to access any of the c# functions in that .dll file.
Can an ASP.NET app be set up like this, short of writing all C# code within the .aspx files?
Assuming you want your application to run as a subfolder of a website bound to http://192.168.1.1:
Build your website, and drop it into a subfolder called "A" in the root website folder
Verify that Network Service and IUsr accounts have read access (at least) to your Subfolder
Verify that the application pool serving the website is using the same version of the .NET Framework as your application (Probably 2.0 if you're using IIS 6)
Verify that the application pool is running under the Network Service Identity
Right click the folder in IIS, and convert it to an application
Make sure you setup an adequate default file on the application, such as default.aspx
Access http://192.168.1.1/A/ and your application should load
Note: All applications in the website must run the same version of the .NET Framework
I am having an issue related to executing a .Net dll from a classic asp application on a 64 Bit Windows Server 2008 server running IIS7. The situation is as follows:
I have written a .Net C# assembly to perform some encryption tasks. This assembly has been made available to the classic ASP environment via inheriting from ServicedComponent, ensuring the assemblyinfo file has the ComVisible(true) attribute, and it has been installed using the "regsvcs" command line.
When testing on my own desktop (XP running IIS6) everything worked fine. When moving to IIS 7, Windows Server 2008 I get the infamous "ASP 0177 Server.CreateObject failed".
I have tried the following to no avail:
Ensuring the ASP and Script Extension features were installed on the server, as this is not the default for IIS7. This allowed me to execute simple ASP commands, but not server.createobject for the .net assembly.
Enabled 32 Bit application support for the app pool supporting the classic asp site
Used NetworkService as the identity for the app pool supporting the classic asp site
Tried registering dll using regsvr32, which failed
I am able to create other objects such as "scripting.filesystemobject"
Moving dll's to the wow64 directory and then using regsvcs to register them.
And yes when I have been executing the regsvcs commands they have been from a command line launched with "RunAs" Administrator. The regsvcs commands have registred successfully
from both the 64 and 32 bit versions. However, when used from the classic asp application, it fails.
This question is closely related to this one. However, I think this question was more related to using tools on the server as opposed to a programatic problem similiar to mine.
Anyone have any more ideas to try?
After a lot of help here and some more research, we finally came across the answer. To solve our issue we did the following:
No longer inherit from ServiceComponent (This is ok, since we are not actually leveraging any specific COM+ features)
Utilized the following commands to install the component, which must be done in order:
gacutil /i "C:\Inetpub\wwwroot\ASPTest*name of dll*"
regasm /tlb "C:\Inetpub\wwwroot\ASPTest*name of dll*"
This process eliminated the original errors and also had the added benefit of being able to replace the dll while IIS is running.
Try this
Component Services -> Computers -> My Computer -> COM+ Applications
Open a COM+ Application object.
Open Components.
Right-click on a class and select Properties.
Under "Advanced" there is a check box for "Allow IIS intrinsic properties".
It works for me
Create a vbs test file and try to create your COM object there. If you can't (i.e. you get the same error) then your component is not registered correctly.
If you can - then it was installed correctly and the problem is with the lack of permissions for the account your application is executed under in IIS.