Hi all,
I installed the Weather module for DNN 3.2.2 from Oliver Hine (http://www.oliverhine.com/?tabid=615). I followed the instructions from Oliver Hine and also signed up for a free account at Weather.com (http://registration.weather.com/registration/xmloap/step1). and got a PartnerID and LicenceKey emailed to me.
The Weather module from Oliver Hine seems to works fine when i install and use it on localhost. When i install this module on my hosted portal then i get a Webpermission failure after setting up the Weather module, providing the PartnerID and LicenceKey and then saving the changes. The next error is thrown onto the screen:
DotNetNuke.Services.Exceptions.ModuleLoadException: Request for the permission of type System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. ---> System.Security.SecurityException: Request for the permission of type System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. at System.Security.CodeAccessSecurityEngine.CheckHelper (PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() at System.Net.HttpRequestCreator.Create(Uri Uri) at System.Net.WebRequest.Create (Uri requestUri, Boolean useUriBase) at System.Net.WebRequest.Create(String requestUriString) at DotNetNuke.Common.Globals.GetExternalRequest(String Address) at OliverHine.Weather.WeatherUserControl.GetWeatherXML(String sLocationToBind, Int32 iLengthToDisplay, String sDisplayUnit) at OliverHine.Weather.WeatherUserControl.BindWeather(String Location) --- End of inner exception stack trace ---
The Portal Logging shows the next log entry:
ModuleId: 811
ModuleDefId: 154
FriendlyName: Weather
ModuleControlSource: DesktopModules/Weather/Weather.ascx
AssemblyVersion: 03.02.02
Method: N/A - Reflection Permission required
FileName:
FileLineNumber: 0
FileColumnNumber: 0
PortalID: 2
PortalName: Test
UserID: 1
UserName: host
ActiveTabID: 394
ActiveTabName : Weather
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: <Supressed>
ExceptionGUID: 509c1d78-1a20-4f30-9737-ffb9ff3e1a2b
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider , DotNetNuke.SqlDataProvider
InnerException: Request for the permission of type System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
Message: DotNetNuke.Services.Exceptions.ModuleLoadException : Request for the permission of type System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. ---> System.Security.SecurityException: Request for the permission of type System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) at System.Security.CodeAccessSecurityEngine.Check (CodeAccessPermission cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() at System.Net.HttpRequestCreator.Create(Uri Uri) at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) at System.Net.WebRequest.Create(String requestUriString) at DotNetNuke.Common.Globals.GetExternalRequest(String Address) at OliverHine.Weather.WeatherUserControl.GetWeatherXML(String sLocationToBind, Int32 iLengthToDisplay, String sDisplayUnit) at OliverHine.Weather.WeatherUserControl.BindWeather(String Location) --- End of inner exception stack trace ---
StackTrace:
Source:
Server Naam: <Supressed>
(I'm not sure if the similair problem i still have with the News Feed module is related to the same Webpermission failure. The error message show in the News Feed module is a custom message that points out that my Proxy Settings must be setup correctly. My provider doesn't use a Proxy.)
I'm running DNN3.2.2, MSSQLServerProvider, .NET Framework 1.1.4322.2300. The Portal is a parent portal installed in the root of my domain and is in the Dutch Language (The Netherlands). My hosting provider has provided me with Plesk 7.5.6 for administrating my domain. My domain is in a shared hosting environment.
On the DotNetNuke forum this thread (http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/postid/5387/Default.aspx) describes a possible solution.
My hosting provider has the trust level setup in his machine.config as folows:
<trust level="Medium" originUrl="http://localhost/.*" />
I have tried different setup for the trust level in web.config (high and full), but with no succes. After every try i did reset my domain via Plesk control by switching my domain off/on (I'm not sure if this resets IIS) and refreshed the browser. The trust level in my web.config is setup as folows:
<trust level="High" originUrl="http://localhost/.*" />
Unfortunately the following screen is the only response i get out of my DNN portal in all trust level cases, except when i comment out the trust tag (original situation):
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: ?
Source Error:
Line 195: <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> Line 196: <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> Line 197: <add assembly="*" /> Line 198: </assemblies> Line 199: </compilation> |
Source File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 197
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
I have no clue what this means. This is not even the page where the weather module is placed on.
My provider did let me know that changing the trust level in machine.config, to a higher level than Medium trust, is not an option for him in a shared hosting environment.
It looks like i've missed some crusial information in the threads i found about "trust level".
Any help on this issue would be appreciated very much.
Zit