It has been a while since my last post.
However we did resolve many bugs and issues meanwhile, including one that many people have had issues with:
- Site importation issues (especially if site is not created by Websitepanel originally)
- Site Dedicated Application pool issues (if site does not have dedicated application pools by default).
Now for the most part it’s a simple code fix, made in 2011 by Pavel, however it was never included in the WSP compiled code.
I do assume that Maxim will push the fix to the main WebsitePanel source shortly, but in the mean time you can manually fix it up quite easy.
Please note this does not fix the “Site Already exists” issue.
The solution for site already exists while it’s NOT inside websitepanel –> Go to the Websitepanel Database –> dbo.domains –> find the domain in question, it will have 2 entries in the Database.
Now the simple fix is: Delete the second entry record (which has sitepointer id).
Once deleted try again and it should work just fine.
Before you start make sure you have the following:
- Visual Studio 2013
- A fresh copy of the Source code of Websitepanel: https://github.com/Virtuworks/Websitepanel
- Make sure the source code is placed somewhere with a short file path similar to: C:/WSP if you have it in C:/users/username/documents you most likely will run into errors where you exceed 256 characters limit.
So the most important thing here is that the fix is in the IIS 7.0 dll settings.
This is still the same even when you use IIS 8.0 or IIS 8.5 as those providers still use the IIS 7.0 provider to do most of the work.
Now for websitepanel it’s absolutely vital that you export the exact same version as your current websitepanel.
To find out what version you have go to:
Right click “WebsitePanel.Providers.Web.IIs70.dll” –> Properties –> Details.
Then check out what exactly it states under “File Version”
Set the version in the source “build-release.bat” located in “WebsitePanel” directory.
In this example we use Visual Studio 2013.
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Build /p:BuildConfiguration=Release /p:Version="2.1.0" /p:FileVersion="184.108.40.2068" /p:VersionLabel="220.127.116.118" /v:n /fileLogger /m /p:VisualStudioVersion=12.0
Please note that FileVersion= and VersionLabel= should be identical to the version you have found in your Websitepanel Server/Bin file.
Now it’s time to make the minor change in the source code.
Go to: WebsitePanel\Sources and open “WebsitePanel.Server.sln”
Once opened open up “WebsitePanel.Providers.Web.IIs70.csproj” in the Solution Explorer.
In “find (Ctrl + f)” type in: runs under NETWORK_SERVICE identity
You will see that bit is commented out with /* and */ –> remove the /* at the top and */ at the bottom so it states:
// Fix. Import web site that runs under NETWORK_SERVICE identity fails.
// WebsitePanel cannot create anonymous account.
if (!user.Name.Contains(site.Name.Replace(".", "")))
user.Name = user.FullName = site.Name.Replace(".", "") + "_web";
Once done, save and exit Visual Studio.
The last little bit is to simply build the source.
First make sure to clear out previously compiled source codes.
Remove everything inside the source: WebsitePanel\Bin
and remove everything in: WebsitePanel\Build\Release
Open up cmd (or powershell, then type cmd)
in cmd go to the source dir: WebsitePanel
It most likely has about 109 warnings (yellow) but should complete fully.
Once completed go to: WebsitePanel\Build\Release\Server\bin
Take out the file called: WebsitePanel.Providers.Web.IIs70.dll
now simply copy and replace the original C:\WebsitePanel\Server\Bin\WebsitePanel.Providers.Web.IIs70.dll
with the one you have compiled.
Changes should take effect immediately.
That was all.
An easy fix for a tedious problem in IIS 7.0 and IIS 8.0
You will now be able to Import sites successfully, and enable/ Disable dedicated application pools without errors.
If you need any help compiling or want us to compile one for you please do not hesitate to contact us.