This project is read-only.

Security Exception

Jul 16, 2008 at 1:24 AM
Hi all,

I've just uploaded the latest blogengine web files to my godaddy server, followed all the appropriate steps and everything is working bar the Profiles. When I click on profiles I get this error message. One thing I should mention is that when I checked the web.config file for the trust level = "high" I could not find it in the first place so I left it alone. Any help would be appreciated.

Server Error in '/blog' Application.

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

Line 30: 	{
Line 31: 		ProfileCommon pc = new ProfileCommon().GetProfile(name);
Line 32: cbIsPublic.Checked = pc.IsPrivate;Line 33: 		tbDisplayName.Text = pc.DisplayName;
Line 34: 		tbFirstName.Text = pc.FirstName;
Jul 16, 2008 at 5:00 AM

I am not sure does this will solve your problem, but it do solved my. Do check out your BlogEngine.Core.dll assembly.cs file, and ensure the following line of code is unremarked.




Jul 16, 2008 at 2:38 PM
Forgive me, but I don't understand what you mean.

The blogengine.core.dll cannot be modified and assembly.cs I cannot find.
Jul 17, 2008 at 10:53 AM

Can someone explain how to unremark the AllowPartialyTrustedCallers line?
Jul 17, 2008 at 1:28 PM
cvandal - Did you have to do anything specific with GoDaddy to get 1.4 up and running? Did you create the directories in IIS Settings or add the App_Data directory and modify the permissions before uploading? I can't even load the main page of the site right now and can't figure out what I'm doing wrong or whether GoDaddy's setup is preventing me from moving forward. I read last night about how GoDaddy uses medium trust, so I'm unsure if that has something to do with it or not.

Any help is appreciated.
Jul 17, 2008 at 4:05 PM

Well, I am running 1.4 on GoDaddy successfully except for the Profiles section.  This is the process I followed:

- From the Control Panel go to Content > IIS Settings.
- Make sure Content Root is selected and click on the Create button.
- Create a directory like Blog or something (no / or ../) and make sure that Anonymous Access and Set Application Root are both selected.
- Wait for the status to change from Pending to Ready which can take up to 10 minutes or so (F5 to refresh).  I noticed that my ftp client would show the folder already created even though GoDaddy control panel still showed Pending.  I tried proceeding then and had problems, but the next time I waited until the Ready status appeared before doing anything else, and all worked fine.

- Next, upload the files to the folder you created.
- Go to the Control Panel and go to Content > File Manager
- On the left panel, select the folder you created, e.g. Blog and the right side will populate with the folder structure.
- Check the box next to App_Data and select the Permissions icon from above.
- Uncheck the Inherit checkbox and Check the Read and Write checkboxes, and click OK

That's it.  Navigate to the URL and all should work.  The first time will take a couple of seconds though.

*** Sorry if this is over simplified, but sometimes I get directions and the other people automatically assume I should know how to do something or where I should click, etc.

Hope this helps,


Jul 17, 2008 at 4:07 PM

I forgot, the thing about Medium Trust shouldn't be an issue in v1.4 like it was in v1.3.


Jul 17, 2008 at 4:25 PM

parallon wrote:

I forgot, the thing about Medium Trust shouldn't be an issue in v1.4 like it was in v1.3.


Thanks for the reply.

I'm up and running now using the default setup and XML provider. I think my trust issue may have been related to using VistaDB. What are you using? Should VistaDB work with 1.4 on GoDaddy with Medium Trust?
Jul 17, 2008 at 5:05 PM
I'm using too godaddy to host my blog using XML, 1.4 works fine out-of-the-box.
I do not have any problems except the Profiles section error.
However if you want to use any version above I get the security exception related to AllowPartiallyTrustedCallers.
If you want to update check the steps here:
I'm using VS2008 Web Developer Express SP1.
I fixed the security exception related to AllowPartiallyTrustedCallers in the same way suggested by hackzai. By the way, I'm not a programmer.
To do that, in VS2008, within Solution Explorer, expand the Blogengine.Core project, expand Properties, right-click AssemblyInfo.cs and click View Code.
Remove the // in front of [assembly: AllowPartiallyTrustedCallers].
Save. Build your solution.
I'm using the latest without any issues. And by now I can access the Profiles section too.
Jul 17, 2008 at 9:19 PM

I am just using the XML at the moment as well.  Will probably keep it this way until the need arises.  As for the Profiles section, I finally figured out how to compile the source code, as I am new to Visual Studio; I used Visual C# though.  It works great, although does anyone know whta the function of the Profiles section is?  If I am not logged in, I cannot access anything related to the profile anyways.  I figured that it would use the photo URL and display the author's picture next to their blog.