The relative virtual path 'extensions.xml' is not allowed here.

Topics: ASP.NET 2.0
Jan 23, 2008 at 4:40 AM
I'm trying to set up a new BlogEngine instance using the mysql provider found here: http://www.mrwize.nu/post/MySQLBlogProvider-for-BlogEngineNET.aspx

I keep getting this error which I can't seem to work around. If I change the provider back to the default XML one it works fine but when I try to use the MySQL provider I get this error - any ideas??

Server Error in '/blog' Application.
The relative virtual path 'extensions.xml' is not allowed here.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: The relative virtual path 'extensions.xml' is not allowed here.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

ArgumentException: The relative virtual path 'extensions.xml' is not allowed here.
System.Web.VirtualPath.FailIfRelativePath() +3609972
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +47
System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath) +46
System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath) +55
System.Web.Hosting.HostingEnvironment.MapPath(String virtualPath) +16
ExtensionManager..cctor() +36

TypeInitializationException: The type initializer for 'ExtensionManager' threw an exception.
ExtensionManager.ExtensionEnabled(String extensionName) +0
ASP.globalasax.ApplicationStart(Object sender, EventArgs e) +145
Jan 25, 2008 at 5:19 AM
Edited Jan 31, 2008 at 3:49 AM
I am having the exact same problem, has anyone figured this out yet. The last time I tried this, it worked fine, so something must have changed. I should note, that I am having this problem with the MSSQL provider, not the MySQL Provider.
Jan 29, 2008 at 12:59 AM
I am still struggling with this one. I download the very latest build. I modified my MySQL Provider to handle the new calls to the provider and added the new be_extensionsettings table, etc.

But I am still unable to get this to run with the MySQL provider. For some reason, when I use the MySQL provider I am getting an error saying it is unable to find the users.xml file. When I use the XML provider as my default it has no such issue.

I obviously need the xml provider for the users and roles...it works fine for users and roles when it's the default provider, but when MySQL is the default provider all the sudden it can't find the users.xml file....what's up???
Coordinator
Jan 29, 2008 at 1:57 AM
In the latest bits, there are two new interfaces added to providers to handle extension settings. You'll need to implement those for MySQL provider similar to how it is implemented for MS SQL provider (MSSQLBlogProvider.cs).

// Loads the extension settings to the provider..
public abstract Stream LoadExtensionSettings();

// Saves the extension settings to the provider.
public abstract void SaveExtensionSettings(Stream settings);
Jan 31, 2008 at 3:08 AM
I've done that. The error I'm getting seems to be related to the location of the users.xml file. I'm still playing with this....grrr
Coordinator
Jan 31, 2008 at 3:43 AM

brendanc wrote:
I've done that. The error I'm getting seems to be related to the location of the users.xml file. I'm still playing with this....grrr


Brendan, where I can download provider you are using? I looked at the 5.04 on the link from the first post, but it doesn't implement extension settings, so I guess you are using different version.

Thanks!
Jan 31, 2008 at 5:38 AM
rtur -

First off, thank you or following up. I am a .Net Dev myself and am dying to get this thing going, once I do I'm looking forward to developing some widgets and helping out with the community in any way I can...anyway

The blog I am trying to build is http://www.devspade.com/blog. I originally got the extensions.xml issue I first reported.

Then I saw you moved the extensions stuff to the provider model so I downloaded that build. With a little effort I was able to modify the provider I downloaded to get that working (locally).

I've posted my modifed provider, the sql script I used to create the mysql tables - same as the one I downloaded except for the 1 new table. I also posted my web config. In order to make it easy for me to switch between local dev and my host company I added a small app config setting for "currentconnection". I can set that at the web config and it will now to either use my host company settings or my local settings.

The files are all posted at http://devspade.com/ds/be_trouble/test.html.

I look forward to hearing your thoughts. Because it runs/works fine locally- I firmly suspect this to be config issue - possibly with my specific web host - brinkster.com

Thanks,

brendanc
Feb 10, 2008 at 11:45 AM
Edited Feb 10, 2008 at 11:45 AM


brendanc wrote:
rtur -

First off, thank you or following up. I am a .Net Dev myself and am dying to get this thing going, once I do I'm looking forward to developing some widgets and helping out with the community in any way I can...anyway

The blog I am trying to build is http://www.devspade.com/blog. I originally got the extensions.xml issue I first reported.

Then I saw you moved the extensions stuff to the provider model so I downloaded that build. With a little effort I was able to modify the provider I downloaded to get that working (locally).

I've posted my modifed provider, the sql script I used to create the mysql tables - same as the one I downloaded except for the 1 new table. I also posted my web config. In order to make it easy for me to switch between local dev and my host company I added a small app config setting for "currentconnection". I can set that at the web config and it will now to either use my host company settings or my local settings.

The files are all posted at http://devspade.com/ds/be_trouble/test.html.

I look forward to hearing your thoughts. Because it runs/works fine locally- I firmly suspect this to be config issue - possibly with my specific web host - brinkster.com

Thanks,

brendanc


Hi, Have you tried to use an absolute path? ('C:\Sites\Single8\bcaff86\webroot\blog\users.xml') ? also there is the Utils.AbsoluteWebRoot property you might use. try the latter first.

Hope its helps,

Cheers Christian
Feb 11, 2008 at 9:59 AM
Hi,

Try executing these SQL lines into your MSSQL database.

INSERT INTO beSettings (SettingName, SettingValue) VALUES ('storagelocation', '~/AppData/');
INSERT INTO be_Settings (SettingName, SettingValue) VALUES ('theme', 'Standard');

The script file 'MSSQLSetup1.3.0.0.sql' given seems to be missing these items. The above works for me. Hope this helps.

Cheers!
Jonathan
Mar 11, 2008 at 4:14 AM
Jonathan -

You're fixed work...not right away - had to fix the typo - should be App_Data. :-)

Thanks a million. Now that I have some free time again I'll finally try to get this blog off the ground.

You guys rock.