Re: Giving a webpart database access
From: Amar Galla (amarsos_nospam_at_yahoo.com)
Date: 03/01/05
- Next message: rishi: "RE: Create Web Part Page Programmatically"
- Previous message: Amar Galla: "Re: Programmatically change an area's url"
- In reply to: The Colonel: "Giving a webpart database access"
- Next in thread: Mike Starr: "Re: Giving a webpart database access"
- Reply: Mike Starr: "Re: Giving a webpart database access"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Mar 2005 14:18:01 +0530
Ideally all you need to access database from a WebPart is the WSS_Medium
trust level. It will not work under Minimal trust level. Check if its a
trust issue or something else, but temporarily boosting the trust level to
Full. If it does not work, then check if you can access the database from
the machine where SPS is running supplying the login credentials you have
used in the code.
You can also check your database access code by temporarily testing it thru
a console app or a asp.net app. There is no big difference between ways to
access database from other apps compared to WebParts.
-- Hope this helps. Regards, Amar Galla http://www.dotnetjunkies.com/weblog/amar/ "The Colonel" <colonelangus@budweiser.com> wrote in message news:1109629895.936635.5350@z14g2000cwz.googlegroups.com... > I have Office SPS 2003 and have created a strongly-named VB.NET webpart > that works until I want to add any database access (local SQL server or > using a DSN). I get the generic "Problem with webpart" error, but with > debug=true and CallStack=True in web.config, I get > "System.Security.SecurityException: Request failed." > > So I read up on setting the security level to WSS_Medium, looked at > that "code access security for developers" document, added > "AllowPartiallyTrustedCallers" to my AssemblyInfo.VB, but it's still > not working and I'm just not getting my head around it. > > Isn't there a step-by-step for this? >
- Next message: rishi: "RE: Create Web Part Page Programmatically"
- Previous message: Amar Galla: "Re: Programmatically change an area's url"
- In reply to: The Colonel: "Giving a webpart database access"
- Next in thread: Mike Starr: "Re: Giving a webpart database access"
- Reply: Mike Starr: "Re: Giving a webpart database access"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|