Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Saturday, February 25, 2012

Aspx with IIS6 with SQL 2000

Hi All,
I am trying to run aspx website on IIS version 6. It works locally with WEb Matrix but when I put the site into the IIS server, it cannot connect to the database. THe IIS is sonfigured and all users have full permissions but the error that is returned is:
Login failed for user '(null)'. Reason: Not associated with a treusted SQL Server connection.
SQL Server 2000 is installed and a connection is open to the database in question.
Would be very greatfull for ANY help on this, being tryin to get this workin for days!!
Collette.
Hi,
I have explained the cause and resolution for this error in the following articles.
http://harishmvp.blogspot.com/2005/05/you-may-receive-error-login-failed-for.html
http://harishmvp.blogspot.com/2005/05/you-may-receive-error-login-failed-for_25.html
One of the above should help you.
Write back if this doesnt help.
Thanks.|||

Hi!

Still having problems with the this! Done everything in the two documents and still no joy!

Error: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Please help!!

Collette.

|||

Hi,

Can you let me know your scenario?

Thanks.

Friday, February 24, 2012

ASPNETDB.mdf - setting your website to use your hosted DB instead

Hi,

I'm running Visual Web Developer 2005 and have created a small site with a log-in function. In VWD this automatically creates the database ASPNETDB.mdf which stores all the user / log-on data.

I have 1 x MS SQL Server 2005 DB which I am using to store data for my site.

Can anyone advise me on how to setup my site / the ASPNetDB so that it runs on my MS SQL Server?

I've searched the ASP.NET forums etc and this does seem to be an area where people are struggling.

I have tried running the ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe) and get the following error:

"Setup failed.

Exception:
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 8152 and the SqlException message is: String or binary data would be truncated."

As a beginner I've struggled from downloading an online template, then uploading it to my site, and the log-on doesn't work. There didn't seem any instructions / advice on what to do with the ASPNETDB.mdf database.

Help / advice would be much appreciated!

Thanks,

Tom

Hi gilbert,

This website is a great place to start reading about security and asp.nethttp://weblogs.asp.net/scottgu/archive/2006/02/24/ASP.NET-2.0-Membership_2C00_-Roles_2C00_-Forms-Authentication_2C00_-and-Security-Resources-.aspx

The things you are probably looking for are Windows or Forms Authentication with SQL Server 2000 (or 2005). When you use the log-in control and don't change any of the settings, for example in web.config, all the default settings will be used. Maybe that's what's causing the error.

This is a link on the page mentioned above, it's about forms auth. and it tells you how to set up that aspnetdb. (http://msdn2.microsoft.com/en-us/library/ms998317.aspx)

Hope this helps!
Wim

|||

theres 8 parts to it.

but the first couple talk about what your asking. in the articles tehre are also links to different other pages which can help you configure your site to use the MSSQL database you have.

http://aspnet.4guysfromrolla.com/articles/120705-1.aspx

ASPNETDB migration

I created a website using Visual web developer express edition (including SQL Express). No the user management section of the site (the login/logout database) was created automatically and SQL Server express was installed at my computer under the instance name of SQLExpress. I uploaded it to my web host and he hooked up the ASPNETDB for me. Now the problem is that ASPNETDB has an id password and I was given theMSSQL Server IP. How do I configure my website to accommodate that? Any help will be extremely useful!!!

you need to modify the connection string in web.config

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="server=server ip;database=ASPNETDB;uid=youUsername;pwd=yourpassword"
providerName="System.Data.SqlClient"/>

</connectionStrings>

|||

WOW! Thats it! Thanks a bunch. One more thing. I am also using the same database to display some data(have added some tables into it manually). What should I put in the connection string to make the connection to the database? Also, can I use a MySQL database instead? If yes, what will be the connection string?

Thanks for your help.

|||

if you don't want to use the same name "LocalSqlServer", then you can add another connection with the same connectionString
like:

<add name="yourConnName" connectionString="server=server ip;database=ASPNETDB;uid=youUsername;pwd=yourpassword"
providerName="System.Data.SqlClient"/>

I am not sure if you can use MySQL as a configuration Database, but you can use it for application database.

Honestly, I didn't use it before. to get the exact connection string for MySQL, try to add a coonection from the wizard and see how vs2005 creates it in web.config

ASPNET user in MSDE

Hello.

I am using MSDE in an ASP .NET application using forms authentication in order to the user can visit my website anonymously but have to authenticate in some pages.

Web server and MSDE server are in the same computer.

I would like to know how role I should set for the ASPNET sql server user. I am using Microsoft SQL Web Data Administrator and when I am creating the ASPNET user, then a page with some roles is shown.

Roles like public (default), db_owner, db_accessadmin, db_datareader, db_datawriter...

I had applied db_datareader and db_datawriter but now, when I use store procedures in my code, an error is made so I have applied db_owner role for the ASPNET user.

Is this correct or db_owner is a excessive privileged role for the ASPNET user?

Thank you and sorry for my English.DONT EVER GIVE THAT USER DB_OWNER!! You're setting yourself up for sql inject attacks.

The best thing to do is create a role named WebUser and add the asp.net user to that role. Then grant execute permissions to the user.

Here's the script that you need:

exec sp_addrole 'WebUser'
go
exec sp_addrolemember 'WebUser', 'MACHINENAME\ASPNET'
go
grant execute on PROCNAME to WebUser

ASPNET user

I just moved my website to a shared host, and I face some trouble.
Since there is more than one DB on the SQL server they don't want to create a ASPNET user. Is there a way to make my SQLCommand use my user name instead of ASPNET ?

Otherwise, can anyone explain to me the result of the ASPNET user on other website who will use the same server as me security wise ?in your connection string, just define the user name and password they assigned you for SQL Server access.|||That's what I do, but when I try to run a stored procedure, I get a security error saying ASPNET user need to have execute access on the SP.

ASPNET security on my sql server

Dear all

I had a problem connecting to my website (through lan) from other machines in the company here.

I googled some and figured out that I have to change the security settings of aspnet in my sql server express 2005.

I did as suggested and now its working

My question is - what should be the real security settings for aspnet on my sql server ?

Should I really add it to the sysadmin ? (what solved the problem...)

Guy

Security settings depend on your environment. They should by design be the least permissions that allow access, but in your case it would mean configuring a new account just for this purpose and you'd likely not add any additional security in an intranet environment.

Jeff

|||

Hi

Thanks for the reply

I am talking about the real world not the lan

I had the problem on lan and that led me to the question :)

Please tell me what should I do on an Internet case

Guy

|||It still depends on what the website needs to do with SQL Server. What was the problem with the SQL Server connection before you add IIS account (or other account?) to sysadmin role of SQL Server?

Sunday, February 19, 2012

ASPNET account

I seem to remember that when using VS2003 to create a website which connected to a MSDE database, I needed to explicitly grant access to the database for ASPNET machine account using the following SQL commands from within a .sql script:

EXEC sp_grantlogin '<machine>\ASPNET'
EXEC sp_grantdbaccess '<machine>\ASPNET'

With VS2005, it sppears that upon creating an .MDF database in the App_Data folder this is no longer necessary.

I'd be interested to know why this is so. Does VS2005 automatically do this when the database is created?

If anybody could shed some light on this I'd be interested.

Thanks,
Wayne.

Yes, it's. When you create the web site project the app_data folder already has the correct permision to worker process account. When you create the new mdf or add existing mdf to this folder, it's automatically inherit the permission from app_data folder.

Hope that helps,

Lan

|||

Thank you for your reply.

I think what you are saying relates to NTFS permissions on the file itself and not to the accounts that are able to connect to the database.

Wayne.

Monday, February 13, 2012

ASP.NET Reports Web Site vs. ASP.NET Crystal Reports Web Site?

Hello,
Thanks for reviewing my question. I hope this is the correct forum. I have
VS 2008 and noticed that when you create a new website you have two choices:
ASP.NET Reports Web Site or ASP.NET Crystal Reports Web Site. What's the
differences? Is one better than the other?
Many Thanks
PeterFor years MS has bundled in Crystal Reports with Visual Studio. They have
continued to do this even as they allow creating reports with their
reporting tool (Reporting Services). They are two different products with
two totally different lineages. RS started out as a server based reporting
product using a service oriented architecture. Crystal Reports started out
as a client/server reporting tool and moved into a server based reporting.
RS added a local mode using the control that shipped with VS 2005.
Reporting Services ships its own development environment if you are using
the server based product (part of SQL Server).
I gather VS 2008 has improved the ability to use the RS control to create
reports over that in VS 2005.
I have no idea what is meant by an ASP.Net reports web site unless they mean
a web site to use the VS reporting services webform control (they ship with
both a webform and winform control).
Anyway, Crystal Reports and Reporting Services both have their plus and
minuses. If using the complete server based product and you already have SQL
Server then the licensing for Reporting Services is much cheaper (RS is part
of SQL Server). Certain types of reports are easier in RS and others are
harder.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Peter" <Peter@.discussions.microsoft.com> wrote in message
news:5EAF8D05-287B-4BF3-A301-83ADC461318C@.microsoft.com...
> Hello,
> Thanks for reviewing my question. I hope this is the correct forum. I
> have
> VS 2008 and noticed that when you create a new website you have two
> choices:
> ASP.NET Reports Web Site or ASP.NET Crystal Reports Web Site. What's the
> differences? Is one better than the other?
> Many Thanks
> Peter|||On 6 Dic, 20:48, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> For years MS has bundled in Crystal Reports with Visual Studio. They have
> continued to do this even as they allow creating reports with their
> reporting tool (Reporting Services). They are two different products with
> two totally different lineages. RS started out as a server based reporting=
> product using a service oriented architecture. Crystal Reports started out=
> as a client/server reporting tool and moved into a server based reporting.=
> RS added a local mode using the control that shipped with VS 2005.
> Reporting Services ships its own development environment if you are using
> the server based product (part of SQL Server).
> I gather VS 2008 has improved the ability to use the RS control to create
> reports over that in VS 2005.
> I have no idea what is meant by an ASP.Net reports web site unless they me=an
> a web site to use the VS reporting services webform control (they ship wit=h
> both a webform and winform control).
> Anyway, Crystal Reports and Reporting Services both have their plus and
> minuses. If using the complete server based product and you already have S=QL
> Server then the licensing for Reporting Services is much cheaper (RS is pa=rt
> of SQL Server). Certain types of reports are easier in RS and others are
> harder.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Peter" <Pe...@.discussions.microsoft.com> wrote in message
> news:5EAF8D05-287B-4BF3-A301-83ADC461318C@.microsoft.com...
>
> > Hello,
> > Thanks for reviewing my question. =A0I hope this is the correct forum. ==A0I
> > have
> > VS 2008 and noticed that when you create a new website you have two
> > choices:
> > ASP.NET Reports Web Site or ASP.NET Crystal Reports Web Site. =A0What's =the
> > differences? =A0Is one better than the other?
> > Many Thanks
> > Peter- Nascondi testo tra virgolette -
> - Mostra testo tra virgolette -
See also this Reporting system
http://www.datatime.eu/DataTimeUniversal.htm
Cheers,
-P

ASP.NET or Sharepoint for SQL Server 2005 access?

I've got existing data stored on a SQL 2000 Server, and want to move to SQL Server 2005 Std.

I want to design a website with forms to look up, edit and add new data to the SQL server. I have specific pages in mind, i.e. a page for scanning in S/Ns for products, a page for allocating products that are in stock, etc.

Is Sharepoint capable of allowing access to SQL server and letting me design such custom pages? Or should I go with Visual C# and use ASP.NET to create the kind of site that I want?

i do not think that sharepoint alone will help you, you might have to use Infopath forms to use the sharepoint option. Or you could right some custome web parts to plug into the sharepoint system. My advice (My own point of view) is that you would be better creating your own custom solution using asp.net, this way you will have more control of the editing of the data. Also with the way that ASP.Net 2.0 is you can do some really quick development using the build in controls. Remember if you are going to ask some specific questions about asp.net you should direct you browser to http://forums.asp.net as this is where most of the asp teams hang out.

|||

I have configured SharedPoint 2007 server with sql server 2005. In this environment you can create portals, blogs and manage enterprise contents. For your requirements you can simply use SharedPoint 2007 server and sql server 2005 and then can whatever you wnat. Don miss it.

Note: you can write vast programming in this environment also with C# for managing your web pages/outlooks/etc...

Shahidul Haque.

ASP.net newbie trying to build a forum

Hi,
I'm an absolute newbie to asp.net... and recently got a start by visiting the beginner developer learning center at the msdn website. I have gone through all of the videos, and now I'm trying to build my first asp.net website... which would be an imaginary forum. I have the following tables in the database used in my application:
Categories
CategoryID int
CategoryName nvarchar(50)
CategoryDescription nvarchar(200)
Threads
ThreadID bigint(8)
CategoryID int
Subject nvarchar(50)
PostedDate datetime
PostedBy nvarchar(10)
Messages
MessageID bigint(8)
ThreadID bigint(8)
MessageBody nvarchar(200)
ReplyToID bigint(8)
User char(10)
You get the idea about what I'm trying to do.
Now, I have successfully written Categories.aspx, and Threads.aspx to display the sample data which I added. The problem is with the messages.aspx. I have no idea how to output data which would give me a means to sort and indent the messages according to the way the users would reply. I mean... users might reply to a message, and another might reply to the reply of that message... creating one big hierarchical mess. So I'm stuck... I can't build my imaginary forum.
Anyone experienced with writing code for forums with SQL server as the back end?
I am hoping to learn some new things about SQL server... maybe... XML? Which would solve my problem? I am already a little familiar with XML and XSL.
Many thanks in advance.
Mohamed Shafiee.
Hello Mohamed,
While this isn't an ASP.NET focused group, and while I don't believe SQLXML
is going to buy you anything here, here's an example that might get you started.
use scratch
go
-- make the message table
drop table dbo.messages
go
create table dbo.messages(
MessageID bigint primary key,
ThreadID bigint not null,
MessageBodynvarchar(200) not null,
ReplyToID bigint null foreign key references dbo.messages(messageID),
PostedBy varchar(50) not null default suser_sname())
go
set nocount on
go
-- some dummy messages
insert into dbo.messages(messageID,threadID,messageBody,ReplyT oID)
values (1,1,'1',null)
insert into dbo.messages(messageID,threadID,messageBody,ReplyT oID)
values (2,1,'1-1',1)
insert into dbo.messages(messageID,threadID,messageBody,ReplyT oID)
values (3,1,'1-2',1)
insert into dbo.messages(messageID,threadID,messageBody,ReplyT oID)
values (4,1,'1-2-1',3)
insert into dbo.messages(messageID,threadID,messageBody,ReplyT oID)
values (5,1,'1-2-2',3)
insert into dbo.messages(messageID,threadID,messageBody,ReplyT oID)
values (6,1,'1-2-2-1',5)
insert into dbo.messages(messageID,threadID,messageBody,ReplyT oID)
values (7,1,'1-2-2-2',5)
insert into dbo.messages(messageID,threadID,messageBody,ReplyT oID)
values (8,1,'1-2-1-1',4)
go
-- @.tid bigint is the ThreadID selected
-- @.rtm bigint is the Message user wants to reply to
drop procedure dbo.GetThreadForMessage
go
create procedure dbo.GetThreadForMessage(@.tid bigint, @.rtm bigint)
as begin
-- Get all the messages in this thread, "nested" by level
;with cte1 as (
select m1.messageID,m1.threadID,m1.MessageBody,m1.ReplyTo ID,m1.PostedBy,
cast(0 as int) as lvl
from dbo.messages m1
where m1.threadID = @.tid and m1.ReplyToID is null
union all
select mr.messageID,mr.threadID,mr.MessageBody,mr.ReplyTo ID,mr.PostedBy,
cte1.lvl + 1
from dbo.messages mr
join cte1 on mr.ReplyToID = cte1.MessageID
where mr.threadID = @.tid),
-- Get the reponses leading to the replying-to message.
cte2 as (
select replyToID from dbo.messages where messageID = @.rtm
union all
select m2.replyToID from dbo.messages m2
join cte2 on m2.messageID = cte2.replyToID
)
-- Last Message in thread
select * from cte1
where cte1.messageID = @.rtm
union all
-- Other messages in thread
select * from cte1
where cte1.messageID in (select ReplyToID from cte2)
union
-- Base message
select * from cte1 where cte1.replyToID is null
order by cte1.lvl desc
for xml path('message'),root('messages'),type
end
go
exec GetThreadForMessage 1,7
go
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/

ASP.net newbie trying to build a forum

Hi,
I'm an absolute newbie to asp.net... and recently got a start by visiting th
e beginner developer learning center at the msdn website. I have gone throug
h all of the videos, and now I'm trying to build my first asp.net website...
which would be an imaginary forum. I have the following tables in the datab
ase used in my application:
Categories
CategoryID int
CategoryName nvarchar(50)
CategoryDescription nvarchar(200)
Threads
ThreadID bigint(8)
CategoryID int
Subject nvarchar(50)
PostedDate datetime
PostedBy nvarchar(10)
Messages
MessageID bigint(8)
ThreadID bigint(8)
MessageBody nvarchar(200)
ReplyToID bigint(8)
User char(10)
You get the idea about what I'm trying to do.
Now, I have successfully written Categories.aspx, and Threads.aspx to displa
y the sample data which I added. The problem is with the messages.aspx. I ha
ve no idea how to output data which would give me a means to sort and indent
the messages according to the way the users would reply. I mean... users mi
ght reply to a message, and another might reply to the reply of that message
.. creating one big hierarchical mess. So I'm stuck... I can't build my ima
ginary forum.
Anyone experienced with writing code for forums with SQL server as the back
end?
I am hoping to learn some new things about SQL server... maybe... XML? Which
would solve my problem? I am already a little familiar with XML and XSL.
Many thanks in advance.
Mohamed Shafiee.Hello Mohamed,
While this isn't an ASP.NET focused group, and while I don't believe SQLXML
is going to buy you anything here, here's an example that might get you star
ted.
use scratch
go
-- make the message table
drop table dbo.messages
go
create table dbo.messages(
MessageID bigint primary key,
ThreadID bigint not null,
MessageBody nvarchar(200) not null,
ReplyToID bigint null foreign key references dbo.messages(messageID),
PostedBy varchar(50) not null default suser_sname())
go
set nocount on
go
-- some dummy messages
insert into dbo. messages(messageID,threadID,messageBody,
ReplyToID)
values (1,1,'1',null)
insert into dbo. messages(messageID,threadID,messageBody,
ReplyToID)
values (2,1,'1-1',1)
insert into dbo. messages(messageID,threadID,messageBody,
ReplyToID)
values (3,1,'1-2',1)
insert into dbo. messages(messageID,threadID,messageBody,
ReplyToID)
values (4,1,'1-2-1',3)
insert into dbo. messages(messageID,threadID,messageBody,
ReplyToID)
values (5,1,'1-2-2',3)
insert into dbo. messages(messageID,threadID,messageBody,
ReplyToID)
values (6,1,'1-2-2-1',5)
insert into dbo. messages(messageID,threadID,messageBody,
ReplyToID)
values (7,1,'1-2-2-2',5)
insert into dbo. messages(messageID,threadID,messageBody,
ReplyToID)
values (8,1,'1-2-1-1',4)
go
-- @.tid bigint is the ThreadID selected
-- @.rtm bigint is the Message user wants to reply to
drop procedure dbo.GetThreadForMessage
go
create procedure dbo.GetThreadForMessage(@.tid bigint, @.rtm bigint)
as begin
-- Get all the messages in this thread, "nested" by level
;with cte1 as (
select m1.messageID,m1.threadID,m1.MessageBody,m1.ReplyToID,m1.PostedBy,
cast(0 as int) as lvl
from dbo.messages m1
where m1.threadID = @.tid and m1.ReplyToID is null
union all
select mr.messageID,mr.threadID,mr.MessageBody,mr.ReplyToID,mr.PostedBy,
cte1.lvl + 1
from dbo.messages mr
join cte1 on mr.ReplyToID = cte1.MessageID
where mr.threadID = @.tid),
-- Get the reponses leading to the replying-to message.
cte2 as (
select replyToID from dbo.messages where messageID = @.rtm
union all
select m2.replyToID from dbo.messages m2
join cte2 on m2.messageID = cte2.replyToID
)
-- Last Message in thread
select * from cte1
where cte1.messageID = @.rtm
union all
-- Other messages in thread
select * from cte1
where cte1.messageID in (select ReplyToID from cte2)
union
-- Base message
select * from cte1 where cte1.replyToID is null
order by cte1.lvl desc
for xml path('message'),root('messages'),type
end
go
exec GetThreadForMessage 1,7
go
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/

Sunday, February 12, 2012

ASP.NET Configuration with VWD 2005 Express Ed.

I am deploying a new website (hosted at Godaddy.com) and want to take advantage of some of the power VWD 5005 offers. Specificaly the 'ASP.NET Configuration' under the 'Website' menu item. How do I go about using the ASP.NET Configuration on a site that is hosted? Is it possible? I want to be able to add new rolls, create some users manually and set permissions on directories. If I cant use ASP.NET Configuration how do i go about this task in a hosted environment. My host is GoDaddy.com

Thank you,

Unfortunately the ASP .NET Web Site Administration Tool?can?only?be?used?to?manage?local?applications.?

Fortunate some tools are available to manage corresponding records in membership database,?you?can take a look at this?tool:

http://peterkellner.net/2006/01/09/microsoft-aspnet-20-memberrole-management-with-iis/

asp.net cannot connect to sql 2000

i have do a web site with asp.net 2.0

when i run the on the development pc it can coonect to db

when i publish the website, it become cannot connect to sql2000

the conn string as below
strConn = "Data Source=SHHDB;Initial Catalog=test8;Persist Security Info=True;User ID=sa;Password=;Trusted_Connection=yes;Current Language=British;"

the DB server is on other pc with same network

and i have public it to same pc with the development pc

it come out with "erro like cannot connect to sqlserver 2005, name pipe error: 40"

the problem is the both iis and dbpc don have sql 2005

only db server installed sql 2000

Hi,

From your question, it seems your application is attemp to use the LocalSqlServer connectionstring which needs a attached Sql Express database, so please don't use the LocalSqlServer and open your Web.Config file and in the ConnectionString node, modify your connection string and make it look like "Data Source=ServerName\InstanceName(or IP address);Initial Catelog=DatabaseName; User id=;Password=". Meantime, as your DB server is on other pc with same network, so please use some tools such as QA to verify if the remote database server can be accessible first.

Thanks.

|||

Sorry duplicate post

|||

Hi,

do you've admin rights to database server? if yes then by yourself or else ask your admin to enable remote connection on the database server. may be following link will help you

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_22604523.html

thanks,

satish.

Thursday, February 9, 2012

ASP.NET 2.0 database with login

Hi,

I very new with ASP.Net 2.0 and I am CONFUSED. I have a website that includes a login that works fine locally, but when I uploaded it to my web host (GoDaddy) the login fails. I get the error

Server Error in '/' Application.

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)

(I checked to make sure that remote connections ARE allowed. I'm using SQL Server 2005.)

The site was done using VS 2005. The ASPNETDB.MDF database was created the the App_Data folder for the login info. I thought that because this was created automatically that I didn't need to create another database on the server. I haven't found any beginner tutorials that go into enough detail about this. Can someone PLEASE point me in the right direction. Some of the FAQ's on the GoDaddy site give information about importing data into a SQL Server Database, saying to use the CSV wizard. Can an .mdf file be converted to a .csv file, and if so, how is it done? I did create a database in my GoDaddy account today, but I'm not sure how to import the data or even if I need to. Do I need to change the name of the ASPNETDB.MDF database to the same as the one on the server?

hi,

You should appropriate an applicationName to each provider :

<membership defaultProvider="CustomizedMembershipProvider">

<providers>

<add name="CustomizedMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="conStr"applicationName="YourApplicationName"/>

</providers>

</membership>

|||

Hi,

I have done this. It still doesn't work.

|||

Hi,

From your description, you are using ASPNETDB in your project, right?

Before deploying your project onto the live server, could you please make sure if your host support Microsoft SQLExpress?

If not, you should convert your ASPNETDB database to Microsoft SQLServer. You can use aspnet_regsql.exe tool to achieve that. And then, then you can upload the database to your server by using DTS(For SQL2000) or SSIS (For SQL2005).


For more information on this tool, see:
http://msdn2.microsoft.com/en-us/library/ms229862(VS.80).aspx


Thanks.

ASP.NET 2.0 and connection to remote SQL 2000 server

Hi
I created ASP.NET 2.0 web application that uses SQL Server 2000 database and
it works perfectly when website and Sql server were on local machine.
Then I installed application on production server. Database is placed on
another server.
I received the error:
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: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
Why it thinks I am trying to connect to SQL Server 2005 ? There is no any
2005 server on remote server!
This is my connection string:
Server=servername;Database=SOX;User ID=userxxx;Password=******;
Query Analyzer and Enterprise Manager connect perfectly (when installed on
production server) to database server! Then I created small console
appplication which uses the same data layer as web application (and
connection string ) - it connected to remote database too! Only ASP.NET
2.0 application couldn't connect to remote Sql server 2000.
Can anyone help?If there is no SQL Server 2005 installed on the server then
it looks like it's hitting the wrong server. Have you tried
using the IP address?
Double check the connection string and server name in the
connection string. On the IIS server, check for aliases and
entries in the host file that could cause it to go to the
wrong server. Log onto the server where IIS is installed and
ping the SQL Server box by name. Make sure the IP address
for the SQL Server box is correct and pointing to the
correct server.
-Sue
On Sat, 5 Aug 2006 23:06:33 +0300, "Mitya Mitriev"
<aaa@.stopspam.org> wrote:

>Hi
>I created ASP.NET 2.0 web application that uses SQL Server 2000 database an
d
>it works perfectly when website and Sql server were on local machine.
>Then I installed application on production server. Database is placed on
>another server.
>I received the error:
>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: Named Pipes Provider, error: 40 - Could not
>open a connection to SQL Server)
>Why it thinks I am trying to connect to SQL Server 2005 ? There is no any
>2005 server on remote server!
>This is my connection string:
>Server=servername;Database=SOX;User ID=userxxx;Password=******;
>Query Analyzer and Enterprise Manager connect perfectly (when installed on
>production server) to database server! Then I created small console
>appplication which uses the same data layer as web application (and
>connection string ) - it connected to remote database too! Only ASP.NET
>2.0 application couldn't connect to remote Sql server 2000.
>Can anyone help?
>

Asp.net

I am designing a website which uses dates input to calculate the total cost of product, using this code

pdatstart =request.form(txt1)
pdatend=request.form(txt2)
plngwd=datediff(dateinterval.day,pdatstart,pdatend)

but it returns an error saying cast from string to type date is not valid
and how can i use it to calculate for the cost in the shopping basket.

ThanxxAre you using this in Crystal Report formula field?