Excel doesn't work in asp.net when deployed in IIS - asp.net

I'm having problem integrating the excel into my asp.net application deployed in IIS. In localhost it works properly but when I deployed it in IIS it returns an error "Unable to get the Open property of the Workbooks class".
I already configured the DCOM Config Security permissions by adding Network Service and IIS in launch and activation and access permissions. I also set 'NetworkService' as Identity in IIS Application Pools but the error still persist.
How can I resolve this? Do I need additional configuration in IIS or component services?

Related

Access to file write.lock in ASP.NET web application writing a Lucene search index

I created an ASP.NET application that uses Lucene for searching my web pages. Locally, everything works fine, but when I deploy it to the IIS server, the code that generates the write.lock file during the creation of the index, gives the following error:
Access to the path 'C:\inetpub\wwwroot\GcsWeb\OnlineHelp\write.lock' is denied.
I'm sure this has to do with the fact that the account under which the web app is running, does not have permission to write files to the web application folder.
How can I fix this? The file itself is not being created so I cannot right-click it and set the security permissions. It has to do with the fact that, maybe, it needs permission to write files, correct? If yes, then how do I do this? Not familiar with IIS security. Using IIS version 8.5 on Windows Server 2012 R2.
You need to find out from the application pool for the website what is the identity it is running under (by default this is Application Pool Identity) and grant that the correct permissions.
You can try this setting:
IIS > Application Pools > [your site] > Advanced Settings > Identity >
Built-in accound > LocalSystem
Check the user identity running the IIS app (usually NETWORK SERVICE) and ensure that user has the proper rights to the applicable folders.

WCF service application does not load on IIS

So, i am trying to host a WCF application and to simplify the problem, i have now created a simple template 'WCF Service Application' on Visual studio 2013 and trying to host it on IIS by adding it to default site through add application and have given permission to IIS_IUSRS but the url seems to load and load, nothing shows up at all.i have also done aspnet_regiis -i but no luck.

Already deployed asp.net web application wont run in different machine

I am trying to run an already-deployed ASP.NET web application on a different machine, but I am getting a machine-to-application error. I am a beginner to ASP so please help me out with this.
This is the error which I get:
"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."
This is an error that is received when you deploy the application to a folder that is not marked as an application in IIS and you have a configuration setting that only works at the root application level. You don't have to do anything with the application, this should completely be an IIS setting. Right-click on the folder in IIS and select Convert to Application and choose the Application Pool appropriate for your application's framework version.
Turns out that the VS was complaining about a configuration section within the web.config file in the Backup folder application...just remove the backup folder so it doesn't have a web.config file under the Virtual directory that your ASP.NET application is running in.
Hope this will help you,
for more detail go through
http://forums.asp.net/t/1031775.aspx?Configuration+Error+allowDefinition+MachineToApplication+beyond+application+level

ASP.NET error log

Every time the ASP.NET application in question throws an error the Global.asax writes to an error file: logs\error.log. The ASP.NET applications works using Windows authentication.
I am able to write to the log file when debugging using Visual Studio, however it does not work when the application is deployed in the live environment. How do I find out what user account I need to give access to: logs/error.log?
The application is deployed on a Windows 2003 Server with IIS6. Microsoft.NET 3.5.
You would have to give the required permissions to the network service account. This link might be able to help you out.
Windows Server 2003 defaults to the "Network Service" account.
This can be verified by opening IIS (expand the computer if needed), expand the "Application Pools" folder, right click on the pool used by your web app, and go to the Identity tab.
FYI: Windows Server 2008 uses the IIS_IUSER instead of Network Services.
I hope that logs folder is a virtual directory setup outside the web site directory.
Otherwise every time you deploy the entire solution you will overwrite the logs folder and its content.
Microsoft has a tool for monitoring file access that can be useful for troubleshooting permission issues.
Process Monitor - http://technet.microsoft.com/en-us/sysinternals/bb896645
You will also want to check if your application is using windows authentication & identity impersonation since that can change the identity the application is executing with when enabled.

I encountered an error that "authentication mode= windows" error .

Error :
It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS.
My error is above. How to solve this problem.
You need to configure the application in IIS.
IIS7 and IIS6 instructions: http://www.affiliatewiz.com/support/appstartpoint.asp
More complete IIS7 instructions: http://msdn.microsoft.com/en-us/library/bb763173.aspx
And more complete IIS5/IIS6 instructions: http://msdn.microsoft.com/en-us/library/zwk103ab.aspx
Technically this crosses the line between programmer and Server Admin duties, but as a .NET web developer, you do need to know that any web site or web app you create in Visual Studio needs to be set up as its own IIS Applicaiton on the web server it's deployed to.
There's a lot of good-to-know info here, particularly if you're doing it all on your own, or the server admins aren't familiar with the relationship between IIS apps and .NET web apps. http://msdn.microsoft.com/en-us/library/6hy1xzbw.aspx
(It's not all that uncommon for admins to not know what we need)
Either more the registration to the appropriate place or correctly configure your virtual directory as an application in IIS.

Resources