Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Custom Membership Provider

Reply
Thread Tools

Custom Membership Provider

 
 
David Bowen
Guest
Posts: n/a
 
      08-07-2006

Hi,

I have written a custom membership provider based to access an existing SQL
profile store. However when I upload my application to a shared hosting
environment I get a security exception of the type IO Exception. This boils
down to a number of lines of code in my provider trying to access the
system.web/machine keys section of my web.config.

The lines of code are:
Configuration cfg =
WebConfigurationManager.OpenWebConfiguration(Syste m.Web.Hosting.HostingEnvironment.ApplicationVirtua lPath);
machineKey = (MachineKeySection) cfg.GetSection("system.web/machineKey");

And I have tried this instead to no avail:
machineKey =
(MachineKeySection)WebConfigurationManager.GetWebA pplicationSection("system.web/machineKey");


Please can someone assist so that I use my custom provider in a shared
hosting environment.

Thanks,

David

 
Reply With Quote
 
 
 
 
Dominick Baier
Guest
Posts: n/a
 
      08-20-2006
what the exact exception?

---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com

> Hi,
>
> I have written a custom membership provider based to access an
> existing SQL profile store. However when I upload my application to a
> shared hosting environment I get a security exception of the type IO
> Exception. This boils down to a number of lines of code in my provider
> trying to access the system.web/machine keys section of my web.config.
>
> The lines of code are:
> Configuration cfg =
> WebConfigurationManager.OpenWebConfiguration(Syste m.Web.Hosting.Hostin
> gEnvironment.ApplicationVirtualPath);
> machineKey = (MachineKeySection)
> cfg.GetSection("system.web/machineKey");
> And I have tried this instead to no avail:
> machineKey =
> (MachineKeySection)WebConfigurationManager.GetWebA pplicationSection("s
> ystem.web/machineKey");
> Please can someone assist so that I use my custom provider in a shared
> hosting environment.
>
> Thanks,
>
> David
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Membership Provider - Custom Error Messages Brett Ossman ASP .Net Security 0 03-11-2009 09:33 PM
Membership or Role Provider // Provider Model // Factories .. How does MS do it? sloan ASP .Net 1 07-03-2007 08:17 PM
Custom membership provider problem John ASP .Net 3 06-21-2007 02:04 AM
Unable to redirect when using custom 'Login' with custom 'Membership provider' asnowfall@gmail.com ASP .Net 0 06-05-2007 05:15 PM
Deploying 2.0 app on a Service Provider .. Membership Provider sloan ASP .Net 5 06-03-2006 11:20 PM



Advertisments