So, I ran into several issues while trying to get .Text set up on my server(s).
To start, I wanted a single Blog, that would be hosted on
Box1
(Win2k Server w/IIS 5.0) and would use a database on
Box2 (Win2k3
Server w/ MS SQL Server 2000). Issues I encountered:
- Server
Error in '/blog' Application
The problem was with the Web.Config Configuration File. The
comments at the very top of the file need to be removed, or moved inside the
<?xml version="1.0" encoding="utf-8"
?> tag. - SQL
Server does not exist or access denied.
This could be a lot of things, but for me it had to do with my connection
string. I had a specifcally named instance of my SQL Server (I chose not to
use the default instance name when I installed the SQL Server) and you need
to include this in your connectionString. In your Web.Config file find the
DbProvider tag, and make sure that your connection
string looks like this:
connectionString = "Password=myPassword; Persist Security Info=True; User ID=myUserName; Initial Catalog=myDatabaseName; Data Source=myServerName\myNamedInstance"
Here the things in bold should be changed to reflect your
particular database settings, and the item in orange is the named instance of your SQL Server.
- When trying to run the DotTextHelper.exe to set up a blog I encountered the following error:
System.Security.SecurityException:
Request for the permission of type System.Data.SqlClient.SqlClientPermission,
System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed. at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSetgranted
Set, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken
permToken) at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames, Int32 unrestrictedOverride) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand()
at System.Data.SqlClient.SqlConnectionString.Demand(SqlConnectionString constr)
at System.Data.SqlClient.SqlConnection.Open() at DottextHelper.CreateBlog.AddBlog(String[]
items)
Here the problem was the DotTextHelper (DTH). You must be sure to run the
DTH from the machine that the database is on!!! And by that, I mean that the
DotTextHelper.exe must physically sit on the same machine as the database.