v2.0 WebParts Issues

bri189a

Senior Contributor
Joined
Sep 11, 2003
Messages
1,004
Location
VA
My shared host has set up a server for us to do VS2005 demos on. They did not install SQL Server Express or it's not reachable by my application...can't get a straight answer from them.

When doing web parts, the web part manager, or whatever it is, that controls the persistence of user settings is built by default to connect to SQL Server (how I'm not sure...connection string somewhere?), so anyway I made a custom personalization class for it to talk to. Problem now is that the darn manager wants it to be registered - which can't be done because it's a shared host and an individual web site isn't going to be allowed to register their custom objects.

Does anyone have a clue how to get web parts working on a shared web host where you're only database option is Access?

Also, on a side note, why is Microsoft going to more and more of this 'registered' stuff...I thought the hole XCOPY part of .NET (outside of core framework) made life great...now we're getting back into all this registering stuff...what's the deal with that? This is two great features now that I can't use because of things that don't 'have' to be registered technically, but MS is making it so that it has to be (Enterprise Library, and any custom Personalization object for WebParts...I'm sure there's more).
 
IIRC you can register a provider for a single web application via the web.config file. Can't remember exactly how (not got asp.net 2 on this pc either) but I think you need to specify a <providers> tag inside the <personalisation> tag nested within the <webparts> tag :confused: (I could have that totally wrong mind.)
 
PlausiblyDamp said:
IIRC you can register a provider for a single web application via the web.config file. Can't remember exactly how (not got asp.net 2 on this pc either) but I think you need to specify a <providers> tag inside the <personalisation> tag nested within the <webparts> tag :confused: (I could have that totally wrong mind.)

Keep forgetting what IIRC means...anyway, I saw that somewhere but I could never get past that error.

Also, this has been driving me nuts...SQL Express...can't open in Enterprise Manager; when trying to register I get 'You must use SQL Server management tools to connect to this server'...but the tools that come with SQL Express when you install CR1 doesn't contain any tools that allow you to view databases, set users, etc...just network protocol stuff. Anyway, with web parts...does it just build all the necessary tables, views, stored procedures, etc? Or is it already built as a template in SQL Express? I ask, becasue when I got to push this at work, I'm going to need to know what special requirements are needed for configuration management (as I'm in charge of that).

Thanks PD for your help, as always you are the master of answers.
 
IIRC - If I remember correctly.

I did manage to get this working once with a remote SQL server rather than SQL Express installed locally and it was quite a pain to get right, from what I remember the tables etc were created automatically by a command line utility - this is probably not the case if you are designing your own provider from scratch though.
I don't think you can manage the 2005 versions from a 2000 enterprise manager console - although if you have the SQL 2005 tools installed you can manage earlier versions as well as the express edition. You should be able to manage an Express edition database from within VS.Net 2005 though.
 
Last edited:
The thing that is getting me, because I tried again and I added those config settings as MSDN points out, but the manager doesn't seem to look at them.

<membership defaultProvider="AccessMembershipProvider" userIsOnlineTimeWindow="15">

<providers>

<add
name="AccessMembershipProvider"
type="WebPartsDemo.AccessMembershipProvider"
connectionStringName="AccessMembershipConnection"
enablePasswordRetrieval="true"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
writeExceptionsToEventLog="true" />

</providers>
</membership>

If the object doesn't look at this setting, what is the point of it being there?
 
If you have the 2005 MSDN installed then [mshelp=ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_aspnetcon/html/90f65aa9-82dd-4a86-97e6-911037bd6cfa.htm]This link[/mshelp] might be of some help. (If the link doesn't work try searching on "How to: Build and Run the Profile Provider Example ").
This is an article that shows how to build and use a custome provider that stores it's data in Access via ODBC - sounds like the kind of thing you want.
 
Back
Top