I have an ASP.NET Web Application Project that has been in service for several years. The site is a .NET 4.0 application running in a 32-bit "Classic" application pool running on Windows Server 2008 under IIS 7.5. On rare occasion, I will make minor modifications and republish the site. As of the use of Visual Studio Ultimate 2013, I am experiencing a very strange error with this application.
When I publish the application, and then launch it, the session somehow does not start properly, eventually leading to a "ConnectionString property has not been established" InvalidOperationException. In tracing through the code, this maps back to taking a connection string out of a session variable, and then realizing the session is unpopulated. Again, this is occurring in an application that has worked normally for many, many months.
If I then immediately republish the application, making no changes to anything whatsoever, launching the site then works properly, with no such ConnectionString failures or session issues.
If I publish the site again, the failure returns; and goes away again on a republish. The behavior is entirely repeatable. Every other publish results in a non-working application. No errors are reported by Visual Studio during the publish process.
My investigation and efforts to identify and resolve the issue include the following: Suspecting interference on the part of McAfee on the server, I disabled it entirely; doing so made no difference. I then suspected some peculiar configuration issue on the server; but publishing to a similarly configured server produced precisely the same results/behavior. I suspected some sort of corruption in the web.config file that prevented the connection strings from being read, but I suspect such a failure would surely have excepted in some fashion. I could decrypt web.config manually on the server via aspnet_regiis without issue.
This is merely one of several apps I support in this environment, and none of them exhibit this behavior. Obviously an "extra publish" isn't that big a deal in terms of time (this is not a large site, fortunately), but obviously this idiosyncratic behavior should not be occurring. Suggestions for solution eagerly sought, as this one has me scratching my head...hopefully it's something obvious I'm just overlooking.
Edit 1: I have discovered a colleague who is experiencing the same behavior on an application they manage. They, too, have not found a solution; they simply have resigned themselves to publishing twice when updates are made. As with my experience, they do not experience this behavior on other sites they maintain.
Aucun commentaire:
Enregistrer un commentaire