Small business starterkit issues

G

Guest

Has anyone on the team responsible for the smallbusiness starter kit every
ran this thing on anything other than the Visual Studio Development Server.

After spending time getting used to this kit and adding my pages to it (only
pages no custom code), I tryed deploying it to my hosting provider. After
having everything work fine under VS 2005, I can't even view any pages
because I get this:


Server Error in '/' 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.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

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:

[SecurityException: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
bFromProxy) +678
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share) +114

System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String streamName) +80

System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
streamName, Boolean assertPermissions) +115

System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName) +7

System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String
streamName) +10
System.Configuration.UpdateConfigHost.OpenStreamForRead(String
streamName) +42
System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +443





Apparently I don't have the proper trust levels (thats what the message
says) to run this starter kit. Now my hosting provider isn't going to up my
trust level, as it seems you guys recommend medium trust in a shared hosting
environment anyway, so does anyone have any guidance on how to get this kit
working in a medium (I'm assuming its medium it may be lower) trust
environment?

I've spent 7 days on this already so any help would be appreciated.
 
L

Luke Zhang [MSFT]

As I replied in another thread,you may create a custom policy file based on
the Medium trust file, and then modify the FileIOPermission. For more
details, you can refer to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html
/PAGHT000020.asp

But this also require the provider's assistance. We cannot get around the
permission without the provider.

If there is any things I can provide, please feel free to let me know.

Regards,


Luke Zhang
Microsoft Online Community Lead

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

Guest

Thanks for the suggestion. My hosting company was not very helpful with this,
but after looking through code an tracking down the errror I realized that
the problem was this call:
WebConfigurationManager.OpenWebConfiguration("~");

Apparently you need access to all configuration files in the inheritance
hierarchy in order to make that call. This is why I was getting the error
since my host had locked down their config files (as should be expected) I
was able to work around this by not using the custom ThemesExpressionBuilder.
 
L

Luke Zhang [MSFT]

Thank you for the update. I am glad to hear hte problem has a proper
solution. :)

Regarrds,

Luke Zhang
Microsoft Online Community Lead

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top