This project has moved. For the latest updates, please go here.

Web.Config and GAC

May 25, 2012 at 1:37 PM

This tool is very, very sweet!  I'm a newbie, but I could hardly wait to publish my web app (ASP.NET, C#).

Everything works in Visual Studio development environment, but pukes on our corporate servers with a web.config reference error.  After Googling (including here), one suggests a simple assembly reference in web.config will take care of it (it doesn't); one suggests the dll needs to be in the GAC; one says put the dll in the GAC but add a full publickeytoken reference; one site says it won't work in the GAC at all.

Yikes!  And, with standardized corporate servers I doubt I would even be allowed to put something in the GAC anyway.  I thought a simple bin dll in my app would take care of it.

Anybody help me figure out what to do?  Thanks in advance.

Coordinator
May 25, 2012 at 3:09 PM

This is usually a permissions problem where your webapp doesn't have access to the files in the bin folder. AFAIK the GAC is only required when dealing with Sharepoint or PowerShell.

May 25, 2012 at 7:10 PM

Well, I do have access to the bin folder.  But after expanding the error on the web server, I found that the error was not complaining about ClosedXML, but about the Microsoft DocumentFormat.OpenXML library.  That's referenced in my app of course, but with no web.config entry and no dll in the bin folder.  So I added a web.config entry.

Stll not out of the woods, apparently there is no such animal in the GAC on the server.  Odd.  If I cannot get this installed (due to corporate policies) is there a workaround?  Like maybe adding the dll to the bin?

May 26, 2012 at 2:44 PM

So, all is well.  I figured I'd probably never (not in my lifetime anyway) get authoriation to install something on the corporate servers, even a simple Microsoft tool, so I tried a simple test.  I placed the DocumentFormat.OpenXML DLL into the bin folder of my published app, and voila!  Everything works.

Thanks all.