468,290 Members | 2,017 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,290 developers. It's quick & easy.

Anyone tried the design templates from MSDN?

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/re...s/default.aspx

--
Alan Silver
(anything added below this line is nothing to do with me)
Dec 15 '05 #1
10 2273
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?

Dec 15 '05 #2
>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.

--
Alan Silver
(anything added below this line is nothing to do with me)
Dec 15 '05 #3
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.

Dec 15 '05 #4
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/...le.php/2224361

Dec 15 '05 #5
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
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/...le.php/2224361


--
Alan Silver
(anything added below this line is nothing to do with me)
Dec 19 '05 #6
>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

--
Alan Silver
(anything added below this line is nothing to do with me)
Dec 20 '05 #7
So that means that you are running asp.net on Win 2003 Server? If
not, then the process identity is aspnet

Dec 20 '05 #8
>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

--
Alan Silver
(anything added below this line is nothing to do with me)
Dec 20 '05 #9
Anyone any idea about this? TIA
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


--
Alan Silver
(anything added below this line is nothing to do with me)
Dec 21 '05 #10
Anyone?
Anyone any idea about this? TIA
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


--
Alan Silver
(anything added below this line is nothing to do with me)
Jan 2 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

43 posts views Thread by grz02 | last post: by
6 posts views Thread by Mr.Tickle | last post: by
3 posts views Thread by Franck | last post: by
2 posts views Thread by tdavisjr | last post: by
169 posts views Thread by JohnQ | last post: by
1 post views Thread by Nilla | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.