ASP.NET App Exports to Excel (or not in this case) - asp.net

Exising .net 2 app migrated to .net 4 and moved to an IIS7 Windows 2008 R2 server.
We used to be able to run some code on the web page to export some stuff to excel.
Now, when we do... we get the following error:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {00024500-0000-0000-C000-000000000046} and APPID
Unavailable to the user d"omain\username" SID (S-1-5-21-2084383492-816144152-925700815-4150) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.
Any thoughts?
I did wonder if it may be to do with the authenticated user being on a different domain to the webserver - where we see this error??

Try following this resolution:
Microsoft Support
I believe that the basics of the error are the same. The user you are trying to run the DCOm component as does not have permission to start it.

Restarted the web server and this error no longer appears... I get another error when I try and do the workbook save... I'll post another question on that.
Thanks for your help

Related

IIS ASP.net Web service, creating an excel instance

I'm creating an Excel document (which is then sent to the user) in an ASP.Net Web Application.
Everything works correctly when testing within visual studio, however when I run the application in IIS I get the following error:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {00024500-0000-0000-C000-000000000046} and APPID Unavailable to the user IIS APPPOOL\*** SID (***) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
I've read through this and this and tried to set up the permissions through the Component Services but I still have yet to resolve the issue.
The line which I believe is causing the issue is
Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
Thanks in advance
Resolved by switching to EPPlus instead of Interop

How to configure ASP.NET site on IIS 7.0

I found a lot of articles on internet about "Deploying ASP.NET website on IIS 7.0" and now i know that how to do it.
But unfortunately when i set website on the IIS, i get another error! At the first i got "IIS APPPOOL\TradeSite" error. but, when i changed IDENTITY of related Application Pools to LOCALSYSTEM it solved. After that i got new error message with this specification:
Server Error in '/' Application.
Cannot open database "TradeSite" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
please help me how to fix this problem.
i add sites with this method:
copy published project to wwwroot folder of IIS
Add new web site in IIS and Set their port to a unique port number ex:8090
Change .Net framework version from 2.0 to integrated 4.0
Change process model identity to LOCALSYSTEM from advance setting menu
that's it. it was all the work that i did.
also, I read somewhere that you should open an connection to SQL, i don't know was it a correct solution or not, but i did it but again nothing changed.
Also i tested on both Server and Local IIS but the result was same.
it will be my pleasure that anyone help me on this issue.
Thanks in advance.
Is your TradeSite db hosted in SQL Server? If so, open up the database in SQL Server Management Studio, select Security, and ensure that Network Service has access to at least read from the database.

COM Applications not working

Our Test web server recently went down and we lost COM+ Applications installations. I am trying to reinstall the COM Applications. I have the installed the COM Applications and have the Identity set to run as Local Service. I have Security set to Perform access checks at the process and component level. The activation type is Server Application.
Environment:
Windows Server 2003
Classic ASP
I have verified that ASP is installed and works. I get a 500 Internal Server error when the page gets to a point to call CreateObject.
There must be a security setting somewhere that I am missing. I have tried giving Local Service Account and Network Service account full permissions on the root folder housing the .dll's.
Can't pinpoint it because the possible causes are legion.
There should be a setting in ASP that will report the HRESULT of the failed CreateObject call, instead of a useless 500 - Internal Error. From there, it should be easier to go on.
Aren't you unsure about LocalService, too? Shouldn't it be NetworkService instead?
Sorry that this is rather meager.
Found the problem. We had to go into IIS, view the website properties, go to the Home Directory, Click on Configuration and then the Options tab and finally check the "Enable Parent Path" checkbox.

ASP.NET virtual directory error

I set up virtual directory in IIS 6. The asp.net setting for my application pool is 4.0.
When I try to access my site I get the following error.
Server Application Unavailable
The web application you are attempting to access on this web server is
currently unavailable. Please hit the "Refresh" button in your web
browser to retry your request.
Administrator Note: An error message detailing the cause of this
specific request failure can be found in the application event log of
the web server. Please review this log entry to discover what caused
this error to occur.
When I check the event application log I get the error below.
Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied.
It looks like some sort of permissions error but I can't figure out what. Anyone have any ideas?
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Use ProcMon from Microsoft to trace the file access of your web server worker process (aspnet_wp.exe on XP, w3wp.exe on Win7, 2003, 2008). If you filter where Process Name contains one of those two EXE names, you will eventually see an ACCESS DENIED entry in the status column. This will tell you what folder/file that your web server app cannot access or open.
Tip: for easier reading of results, turn off the registry and network tracing in ProcMon before doing your test.
You can try giving the IIS_WPG group (or whatever group the application is running as) read/write access to you app directory and see if it helps.
Your pool is set as .NET 4 framework but is your application set to using .NET 4?
Verify the ASP.NET tab is set to correction version on your virtual directory properties:
Also check to see that your ASP.NET user has the correct access by:
Right click the website folder in IIS
Select Permissions
Select Network Service
Permit read access to the user that the ASP.NET process runs as.
You are probably using a custom user or else the persmissions would most likely be correct out of the box.

Asp.net - publishing a web site is causing an access denied error

I am working in visual studio 2008 sp1 and trying to publish a web site to a local directory. I keep getting the following error :
Error 3 Access to the path 'C:\Users\name\Documents\Sandbox\BTNET\App_Data\BTNET.mdf' is denied.
My question is how do I determine what user account Visual Studio is running as? I have tried to give everyone, guests, and IUSR_ full control and I am still getting this error. It’s painful..
You must "run as Administrator" VS2008 and publish site
Bring up task manager (ctrl+alt+delete) and look for devenv.exe.You should see the user in the User Name column.
AFAIK (As Far As I Know), it's ASPNET account
Since you're having problems accessing the DB file, make sure all the connection to that database are closed. That file might be in use, which in turn will cause the error.
It sounds like either an application is open and using the file(i.e. Visual Studio, modifying the schema or data or an instance of Access) or the user publishing the files does not have access to the delete files.
The first scenario is more common.

Resources