Anyone tried the design templates from MSDN?

A

Alan Silver

Hello,

I discovered the MSDN design templates[1] yesterday and have been
looking at them.

I have a problem with the Personal template. I don't have SQL Server
Express loaded, as I already have SQL Server 2000, and use that instead.
All of the other samples work fine with this when you change the
connection string, but the Personal sample fails to start. The error
is...

"An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)"

and comes on the line...

return HttpContext.Current.Profile["StylesheetTheme"].ToString();

This sounds like the problem is to do with personalisation. I guess that
it is trying to connect to SQL Server Express to get the personalisation
data, but failing because there isn't an SSE installation.

Anyone any idea how to get around this and get the template working.
Can't personlisation be done with an Access database? If so, is there a
simple way to modify this template to do that instead?

Thanks for any help. If you haven't seen these template, I recommend
them.

[1]
http://msdn.microsoft.com/asp.net/reference/design/templates/default.aspx
 
T

tdavisjr

Yes, I played around with them yesterday. Pretty cool.

However, in regards to the issue you are having. Is your SQL Server
2000 configured for asp.net 2.0? ...meaning do you have a database
already setup called aspnetdb.

Also, did you tell the web.config file to point to your SQL Server 2000?
 
A

Alan Silver

Yes, I played around with them yesterday. Pretty cool.

Very, but a bit confusing at first. I can see that wading through that
lot to see how they did it will be a major job.
However, in regards to the issue you are having. Is your SQL Server
2000 configured for asp.net 2.0? ...meaning do you have a database
already setup called aspnetdb.

No, I wouldn't know how to!! Can you point me in the way of some
instructions?
Also, did you tell the web.config file to point to your SQL Server 2000?

Yup, the other templates all work fine. All I did was change the
connection string. This one falls over before it gets that far though
;-(

Thanks for the reply, any further help would be gratefully appreciated.
 
T

tdavisjr

in your .NET framework installation direction (
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727)
there should be a file called aspnet_regsql.exe. Run that utility and
it will create the database for you with all the asp.net specific
tables. That should do it.
 
T

tdavisjr

Ooops I forgot. You also need to attach that database file that is in
the APP_DATA folder to Sql Server as well. This is one way sql server
can use that database in its current location. Or, you can copy the
..mdf and the .ldf files to SQL Server Data Directory which you can find
in Program files, Sql Server, 80 folder and data directory (I think
this is it), then you need to run a stored proc to attach the database
passing in the database name and file path. See this article for
further reference

http://databasejournal.com/features/mssql/article.php/2224361
 
A

Alan Silver

Thanks for the info. In the end, I decided it was easier to download SSE
and install it on the development machine that I used for the design
templates. That avoided all these issues!!

Cowards' way out, but I have enough to do without reconfiguring things
just to get the samples to work.

Ta ra
 
A

Alan Silver

Thanks for the info. In the end, I decided it was easier to download
SSE and install it on the development machine that I used for the
design templates. That avoided all these issues!!

OK, so it didn't!!

Once I installed SSE, the site came up OK, but when I tried to change
the theme, I got the following exception...

Failed to update database "D:\DOWNLOADS\MICROSOFT ASP.NET DESIGN
TEMPLATES\PERSONAL\APP_DATA\ASPNETDB.MDF" because the database is
read-only.

Now I checked the file in question and it isn't read-only. I also gave
NETWORK_SERVICE full permissions on both the file and the containing
folder.

Any ideas why I got this and what I can do about it? TIA
 
T

tdavisjr

So that means that you are running asp.net on Win 2003 Server? If
not, then the process identity is aspnet
 
A

Alan Silver

So that means that you are running asp.net on Win 2003 Server? If
not, then the process identity is aspnet

Sorry, should have mentioned that. Yes I'm using Windows 2003 Server SP1
with IIS6.

I don't actually think it's a permissions issue, as if it were, the
exception would have been different. This one seems to think the
database is read-only, not that it doesn't have permission to modify the
file. I could be wrong here though!!

Does that help? Thanks
 
A

Alan Silver

Anyone any idea about this? TIA
OK, so it didn't!!

Once I installed SSE, the site came up OK, but when I tried to change
the theme, I got the following exception...

Failed to update database "D:\DOWNLOADS\MICROSOFT ASP.NET DESIGN
TEMPLATES\PERSONAL\APP_DATA\ASPNETDB.MDF" because the database is
read-only.

Now I checked the file in question and it isn't read-only. I also gave
NETWORK_SERVICE full permissions on both the file and the containing
folder.

Any ideas why I got this and what I can do about it? TIA
 

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,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top