|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Anyone tried the design templates from MSDN?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 -- Alan Silver (anything added below this line is nothing to do with me) 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? >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 No, I wouldn't know how to!! Can you point me in the way of some >2000 configured for asp.net 2.0? ...meaning do you have a database >already setup called aspnetdb. 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) 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. 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 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/mssql/article.php/2224361 > -- Alan Silver (anything added below this line is nothing to do with me) >Thanks for the info. In the end, I decided it was easier to download OK, so it didn't!!>SSE and install it on the development machine that I used for the >design templates. That avoided all these issues!! 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) So that means that you are running asp.net on Win 2003 Server? If
not, then the process identity is aspnet >So that means that you are running asp.net on Win 2003 Server? If Sorry, should have mentioned that. Yes I'm using Windows 2003 Server SP1 >not, then the process identity is aspnet 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) Anyone any idea about this? TIA
Show quote >>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) Anyone?
Show quote >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) |
|||||||||||||||||||||||