Classic ASP Server.CreateObject permission denied - asp-classic

I have written a com object that several classic ASP sites are using to access our database. We have 1 site that is on its own server that works flawlessly. We have another server that is hosting 2 sites, but on that server 1 of the sites works fine but the other gets an error when creating the com object.
Here is the text from the error message: The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
I immediately assumed this was because the account that the app pool is using doesn't have access to the location where the com object is located, and everything I've found online agrees with that. I made sure that the account does have full access but it did not help. I even tried running the not working site on the same app pool as the site that does work. This still didn't fix the problem.
Thanks

Related

Server error when copying ASP.NET code to another host

Sorry for the simple question.
I have moved a site to a host by simply copying the code but even the first login page fails if I include the following :-
In Web.config file..if I add the following
or...
Aspx page..if I include a reference to a class file ( which does exist in the app_code directory )
Sign In <%If clsGeneral.str(Request("timeout")) = "t" Then Response.Write(" - YOUR SESSION EXPIRED")%>
I get the error...
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
etc...
Copying an application from one host to another is only simple in the file copy. There are a number of issues that may arise from the application running on the "new" server. For example, is the server running the same version of IIS? Is IIS configured properly for this application? Etc ... to see what error the application is throwing, inspect the Application Log in the event viewer on the server. This will give you some hint as to what the issue is. Without that information, there's really no place you can start, except maybe turning off the custom error or error suppression to see the error details in the browser. But I would recommend that you inspect the Application event log on the server.

IIS 7 not showing virtual directory mapped to another machine

I have an issue with IIS7 when mapping virtual directories to another machine.
This is my setup:
my Web APP is running on the web server (let's call it WEBSERVER). Windows Server 2008, IIS 7.
I got some assets/images in an assets server (let's call it ASSETSSERVER). Windows Server 2003, on the C:\Assets folder, shared as \\ASSETSSERVER\Assets
Servers are in a workgroup, not a domain. This is something beyond my control, which I can't change.
Following the recommendation of our network team, I configured the app pool to run under the user WEBSERVER\portaluser
In my web app, I define a virtual directory. I map it to \\ASSETSSERVER\Assets. In the log in credentials, I specify the user ASSETSERVER\assetsuser (which exists). The 'Test credentials' buttons show that i am authenticated OK and that I have authorisation.
At first, I got a 500.19 error telling me I could not log in. This post revealed the solution: I had to create a WEBSERVER\assetsuser user with same password (counter-intuitive, but it worked).
After that, my assets still refuse to display. I now get a message similar to this:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: An error occurred loading a configuration file: Failed to start monitoring changes to '\\ASSETSERVER\assets'.
Source Error:
[No relevant source lines]
Source File: \\ASSETSERVER\assets\web.config Line: 0
I have done some extensive googling, and I have tried the following:
Modified the local policy to allow WEBSERVER\portaluser to impersonate other accounts after login, as suggested here (it's for Windows 2000 Server but it was worth a try!)
Added permissions to everyone to the \\ASSETSSERVER\assets, as indicated here (bottom answer)
Added read/execute/list permissions to the c:\ drive in ASSETSSERVER to the ASSETSSERVER\assetsuser user, as suggested here (method 3)
I edited the registry key to stop IIS from monitoring the folders for changes, as indicated here (the writer claims that it's not related to IIS but I am quite certain that IIS does monitor the folders for changes in web.config)
I have configured allowsubdirconfig="false" in applicationHost.config as indicated here
None of these solutions have worked, and I am running out of ideas of what to try. It seems like I'm so close yet so far. Any suggestions?
After several of work I found the solution to this issue.
It was as simple as creating a user called "portaluser" (the same as my app pool identity user) in ASSETSSERVER.
This is counter-intuitive: I explicitly told IIS7 to connect to ASSETSERVER as the assetsuser server, but it was still using portaluser to check for the existence of web.config (and monitor for changes).
Having seen that, I decided to use the same account to run the app pool and to connect to the remote virtual directory. I just used 'assetsuser' instead of 'portaluser'
Hope this helps

Unable to consume WCF service (hosted in IIS )

I have hosted my web-application in IIS 5 in a virtual directory.
When browsing .aspx web pages everything works fine. Web-page takes few inputs from user and invokes WCF services. On making the service call I get below exception -
There was an error in serializing body of message : 'Unable to
generate a temporary class (result=1). error CS2001: Source file
'C:\WINDOWS\TEMP\peqft5u5.0.cs' could not be found error CS2008: No
inputs specified '
I have double checked environment variables looks good in the server.
I can confirm, there is no problem in code since, same works perfectly fine in other box of similar configuration & hosting environment.
ASP.NET default user was not having write access to TEMP folder. Posting the answer in hope it would be helpful later, some day!

ASP.NET Web Application Error

I have an application with the main and 2 sub pages. The main page works and one of the sub pages work fine. But the other sub page gives me an error:
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
When trying to run on my local, i get
An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
These were working fine a week ago and this problem is sudden. help please.
You are facing this issue because the SubPage you are getting error on accessing might be under some security. The error you have described comes on a page which is not accessible to the anonymous user.
You must check the Web.config firstly to see if there is some Location Access permissions defined for that Webpage and ensure that they are correctly defined.
You may read about more to this problem by a previous Answer.
web site configuration

ASP File Permissions

I'm a ASP.NET developer who was contacted by a client asking me to make some changes to their site after someone told them it was ASP.NET. It wasn't, it was classic ASP but she seemed at her wits end with it so I said I would give it a go. However I have very little experience with Classic ASP.
Am currently trying to update a form. Have copied the entire site and database to my local machine and got it up and running. I have set the Anonymous user to my windows user to allow me to connect to the database using windows authentication.
The difficulty I am having is when I go to edit an existing record using the edit form and click save on my local machine I get the following error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/xtpropertyedit.asp, line 200
800401f3
However it works fine on the hosted version of the site. I imagine this is an permissions issue. I have tried adding my user with full permissions to the root folder of the site on my local machine but that doesn't seem to make a difference.
Set Jpeg = Server.CreateObject("Persits.Jpeg") '** Line 200 **
Any ideas?
AspJpeg is a paid third-party component and seems like it's not installed on your development computer. It can be used without any limitation for 30 days.

Resources