Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Monday, March 26, 2012

How to show Crystal report 11 in .NET 2.0

Hi all i want to load an rpt file my web application. I want to load rpt other than rdlc file for some specific reason.

I have Visual studio 2005 standard edition installed in my system. And also crystal report 11 developper version installed.

I am working on a ASP application. How can i load RPT file in to my web pages. can anyone help me in this matter.

I want to create the RPT file at runtime using report designed dll in version 11 and i am doing it success fully.

Now the problem is with loading the rpt file in web page can any one help me in this regard.plz

check this out

http://www.developerfusion.co.uk/show/4266/

How to show a linked report in a report container?

I have a report container (reportviewer.dll) in a .net web page to display
the reports using the reporting services. Some of the reportds are linked
report and I am not sure how to display it in the report container.
Currently it opens on a new page. Thanks.I have the same problem...
Any luck with that?
--
http://dotnet.org.za/stanley
"Paul" wrote:
> I have a report container (reportviewer.dll) in a .net web page to display
> the reports using the reporting services. Some of the reportds are linked
> report and I am not sure how to display it in the report container.
> Currently it opens on a new page. Thanks.
>
>

Friday, March 23, 2012

How to setup SQL Express for course use

I will be teaching a web scripting course, and I would like to switch from using MS Access to MS SQL as a database. Please forgive my ignorance, as have much to learn about SQL Express. We have installed SQL Express on a web server (windows box).

Question1:
is SQL like MS Access, in that the SQL Express software should be installed locally on the users machine. The user will create databases and tables locally, then upload the resulting database(s) to the appropriate folder on the web server along with web scripting files?
-- OR
is MS SQL like MySQL, where the db is installed on the remote server, and user accounts are created within the database with appropriate priv.'s. The user logs in to the db application remotely to create tables within a given database.

You can install it either way (locally or remotely). I could see advantages to both. If they install it locally to each machine, you wouldn't have to worry about setting up users/permissions/remote connections, etc on a central server. But if you install it on a central server, you only have to go through the install one time and don't have to worry about the student upload/transfer.

If you don't have much experience with Express, I'd suggest installing Express Advanced so you can get the GUI management tools as well.

Thanks,
Sam Lester (MSFT)

How to setup SelectParameters programmatically?

Hi,

I am using Visual Web Developer 2005 Express Edition.

I am trying to SELECT three information fields from a table when the Page_Load take place (so I select the info on the fly). The refering page, sends the spesific record id as "Articleid", that looks typically like this: "http://localhost:1424/BelaBela/accom_Contents.aspx?Articleid=2". I need to extract the "Article=2" so that I can access record 2 (in this example).

How do I define the SelectParameters or QueryStingField on the fly so that I can define the WHERE part of my query (see code below). If I remove the WHERE portion, then it works, but it seem to return the very last record in the database, and if I include it, then I get an error "Must declare the scalar variable @.resortid". How do I programatically set it up so that @.resortid contains the value that is associated with "Articleid"?

My code is below.

Thank you for your advise!

Regards
Jan

/******************************************************************************** RETRIEVE INFORMATION FROM DATABASE*******************************************************************************/// specify the data sourcestring connContStr = ConfigurationManager.ConnectionStrings["tourism_connect1"].ConnectionString;SqlConnection myConn =new SqlConnection(connContStr);// define the command queryString query ="SELECT resortid, TourismGrading, resortHits FROM Resorts WHERE ([resortid] = @.resortid)";SqlCommand myCommand =new SqlCommand(query, myConn);// open the connection and instantiate a datareadermyConn.Open();SqlDataReader myReader = myCommand.ExecuteReader();// loop thru the readerwhile (myReader.Read()){ Label5.Text = myReader.GetInt32(0).ToString(); Label6.Text = myReader.GetInt32(1).ToString(); Label7.Text = myReader.GetInt32(2).ToString();}// close the reader and the connectionmyReader.Close();myConn.Close();

You can try the following, but you may need to change the resotid if it is an integer type.

SqlCommand myCommand =new SqlCommand(query, myConn);

myCommand.Parameters.Add("@.resortid"

,SqlDbType.NVarChar, 10).Value =Request.QueryString("resortid");|||
Something like this: 
String ArticleID;if (Request.QueryString["ArticleID"] !=null) ArticleID = Request.QueryString["ArticleID"];else// handle bad parameterSqlParameter param =new SqlParameter();param.ParameterName ="@.resortId";param.Value = ArticleID.ToInt32();myConn.Parameters.Add(param);
|||

Hi Limno and SGWellens,

Thanks for your help - I managed to get it working like a charm!

Regards

Jan

Wednesday, March 21, 2012

How to setup iis virtial directory management for SQLXML

I need to setup iis virtial directory management for SQLXML
on our web server SERVER1 to talk to our SQL server SERVER2
however I can not get the snapin to load on SERVER1.
Where do I get the snapin, or what should I be doing?
Thank you
Steven AndersonCould you elobarate your problem a little bit more? Where do you actually
have the problem in the Virtual Directory Management for SqlXml 3.0?
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steven Anderson" <StevenAnderson@.discussions.microsoft.com> wrote in
message news:3BB9821D-07A8-45D1-9243-DE2065FE4503@.microsoft.com...
>I need to setup iis virtial directory management for SQLXML
> on our web server SERVER1 to talk to our SQL server SERVER2
> however I can not get the snapin to load on SERVER1.
> Where do I get the snapin, or what should I be doing?
> Thank you
> Steven Anderson

How to setup iis virtial directory management for SQLXML

I need to setup iis virtial directory management for SQLXML
on our web server SERVER1 to talk to our SQL server SERVER2
however I can not get the snapin to load on SERVER1.
Where do I get the snapin, or what should I be doing?
Thank you
Steven Anderson
Could you elobarate your problem a little bit more? Where do you actually
have the problem in the Virtual Directory Management for SqlXml 3.0?
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steven Anderson" <StevenAnderson@.discussions.microsoft.com> wrote in
message news:3BB9821D-07A8-45D1-9243-DE2065FE4503@.microsoft.com...
>I need to setup iis virtial directory management for SQLXML
> on our web server SERVER1 to talk to our SQL server SERVER2
> however I can not get the snapin to load on SERVER1.
> Where do I get the snapin, or what should I be doing?
> Thank you
> Steven Anderson

How to setup a SQL Database for a shared web hosting?

I would like to offer SQL Database with my shared hosting and don't know how
to do this. Please note that both SQL and IIS are in the same machine. I
appriciate any help on this.
Thanks,
MikeIn a nutshell, you create a blank database for each customer, create a user
account that has dbo rights to that database (and no rights to any other),
and for goodness sake...make sure you back it up for them.
By the way...limit the number of databases, keep an eye on the usage and
performance of the server, and please make sure you call Microsoft to ensure
you have the proper licensing fees paid. Failure to do this opens you up to
legal liabililty.
Having IIS and SQL on the same box and doing shared hosting is a really bad
idea. Are you sure you are ready to go into SQL Server hosting?
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
>I would like to offer SQL Database with my shared hosting and don't know
>how
> to do this. Please note that both SQL and IIS are in the same machine. I
> appriciate any help on this.
> Thanks,
> Mike|||Thanks Kevin for the quick reply.
I already had a user to give the rights to for this particular database.
So after reading your post I went into SQL Server Enterprise Manager and
created an empty database for that user. Then under Users of that database I
added the user from the Active Directory. I gave this user public and
db_owner role.
I tried to connect to this database remotely and I'm getting below error:
Connection failed:
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access deined.
Can you please advice me? Thank you very much.
"Kevin3NF" wrote:
> In a nutshell, you create a blank database for each customer, create a user
> account that has dbo rights to that database (and no rights to any other),
> and for goodness sake...make sure you back it up for them.
> By the way...limit the number of databases, keep an eye on the usage and
> performance of the server, and please make sure you call Microsoft to ensure
> you have the proper licensing fees paid. Failure to do this opens you up to
> legal liabililty.
> Having IIS and SQL on the same box and doing shared hosting is a really bad
> idea. Are you sure you are ready to go into SQL Server hosting?
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
> >I would like to offer SQL Database with my shared hosting and don't know
> >how
> > to do this. Please note that both SQL and IIS are in the same machine. I
> > appriciate any help on this.
> >
> > Thanks,
> >
> > Mike
>
>|||First off, if you are a web host, you would be using SQL Server logins, not
Active Directory.
Remote connections more than likely need to be done via IP address, and the
correct port opened through the firewall.
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...
> Thanks Kevin for the quick reply.
> I already had a user to give the rights to for this particular database.
> So after reading your post I went into SQL Server Enterprise Manager and
> created an empty database for that user. Then under Users of that database
> I
> added the user from the Active Directory. I gave this user public and
> db_owner role.
> I tried to connect to this database remotely and I'm getting below error:
> Connection failed:
> SQLState: '01000'
> SQL Server Error: 53
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 17
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> access deined.
> Can you please advice me? Thank you very much.
>
> "Kevin3NF" wrote:
>> In a nutshell, you create a blank database for each customer, create a
>> user
>> account that has dbo rights to that database (and no rights to any
>> other),
>> and for goodness sake...make sure you back it up for them.
>> By the way...limit the number of databases, keep an eye on the usage and
>> performance of the server, and please make sure you call Microsoft to
>> ensure
>> you have the proper licensing fees paid. Failure to do this opens you up
>> to
>> legal liabililty.
>> Having IIS and SQL on the same box and doing shared hosting is a really
>> bad
>> idea. Are you sure you are ready to go into SQL Server hosting?
>> --
>> Kevin Hill
>> President
>> 3NF Consulting
>> www.3nf-inc.com/NewsGroups.htm
>> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
>> www.experts-exchange.com - experts compete for points to answer your
>> questions
>>
>> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
>> news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
>> >I would like to offer SQL Database with my shared hosting and don't know
>> >how
>> > to do this. Please note that both SQL and IIS are in the same machine.
>> > I
>> > appriciate any help on this.
>> >
>> > Thanks,
>> >
>> > Mike
>>|||Thank you very much. I created a SQL user and opened the firewall port and
it's working now :)
"Kevin3NF" wrote:
> First off, if you are a web host, you would be using SQL Server logins, not
> Active Directory.
> Remote connections more than likely need to be done via IP address, and the
> correct port opened through the firewall.
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...
> > Thanks Kevin for the quick reply.
> >
> > I already had a user to give the rights to for this particular database.
> >
> > So after reading your post I went into SQL Server Enterprise Manager and
> > created an empty database for that user. Then under Users of that database
> > I
> > added the user from the Active Directory. I gave this user public and
> > db_owner role.
> >
> > I tried to connect to this database remotely and I'm getting below error:
> >
> > Connection failed:
> > SQLState: '01000'
> > SQL Server Error: 53
> > [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
> > Connection failed:
> > SQLState: '08001'
> > SQL Server Error: 17
> > [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> > access deined.
> >
> > Can you please advice me? Thank you very much.
> >
> >
> > "Kevin3NF" wrote:
> >
> >> In a nutshell, you create a blank database for each customer, create a
> >> user
> >> account that has dbo rights to that database (and no rights to any
> >> other),
> >> and for goodness sake...make sure you back it up for them.
> >>
> >> By the way...limit the number of databases, keep an eye on the usage and
> >> performance of the server, and please make sure you call Microsoft to
> >> ensure
> >> you have the proper licensing fees paid. Failure to do this opens you up
> >> to
> >> legal liabililty.
> >>
> >> Having IIS and SQL on the same box and doing shared hosting is a really
> >> bad
> >> idea. Are you sure you are ready to go into SQL Server hosting?
> >>
> >> --
> >> Kevin Hill
> >> President
> >> 3NF Consulting
> >>
> >> www.3nf-inc.com/NewsGroups.htm
> >>
> >> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> >>
> >> www.experts-exchange.com - experts compete for points to answer your
> >> questions
> >>
> >>
> >> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> >> news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
> >> >I would like to offer SQL Database with my shared hosting and don't know
> >> >how
> >> > to do this. Please note that both SQL and IIS are in the same machine.
> >> > I
> >> > appriciate any help on this.
> >> >
> >> > Thanks,
> >> >
> >> > Mike
> >>
> >>
> >>
>
>|||For security reasons, you may want to consider changing the default port
that SQL Server listens on to something other than 1433, since every script
kiddie on the planet knows that one...
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:DED2207A-8934-485D-A944-67D7D8C43557@.microsoft.com...
> Thank you very much. I created a SQL user and opened the firewall port and
> it's working now :)
> "Kevin3NF" wrote:
>> First off, if you are a web host, you would be using SQL Server logins,
>> not
>> Active Directory.
>> Remote connections more than likely need to be done via IP address, and
>> the
>> correct port opened through the firewall.
>> --
>> Kevin Hill
>> President
>> 3NF Consulting
>> www.3nf-inc.com/NewsGroups.htm
>> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
>> www.experts-exchange.com - experts compete for points to answer your
>> questions
>>
>> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
>> news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...
>> > Thanks Kevin for the quick reply.
>> >
>> > I already had a user to give the rights to for this particular
>> > database.
>> >
>> > So after reading your post I went into SQL Server Enterprise Manager
>> > and
>> > created an empty database for that user. Then under Users of that
>> > database
>> > I
>> > added the user from the Active Directory. I gave this user public and
>> > db_owner role.
>> >
>> > I tried to connect to this database remotely and I'm getting below
>> > error:
>> >
>> > Connection failed:
>> > SQLState: '01000'
>> > SQL Server Error: 53
>> > [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
>> > (Connect()).
>> > Connection failed:
>> > SQLState: '08001'
>> > SQL Server Error: 17
>> > [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist
>> > or
>> > access deined.
>> >
>> > Can you please advice me? Thank you very much.
>> >
>> >
>> > "Kevin3NF" wrote:
>> >
>> >> In a nutshell, you create a blank database for each customer, create a
>> >> user
>> >> account that has dbo rights to that database (and no rights to any
>> >> other),
>> >> and for goodness sake...make sure you back it up for them.
>> >>
>> >> By the way...limit the number of databases, keep an eye on the usage
>> >> and
>> >> performance of the server, and please make sure you call Microsoft to
>> >> ensure
>> >> you have the proper licensing fees paid. Failure to do this opens you
>> >> up
>> >> to
>> >> legal liabililty.
>> >>
>> >> Having IIS and SQL on the same box and doing shared hosting is a
>> >> really
>> >> bad
>> >> idea. Are you sure you are ready to go into SQL Server hosting?
>> >>
>> >> --
>> >> Kevin Hill
>> >> President
>> >> 3NF Consulting
>> >>
>> >> www.3nf-inc.com/NewsGroups.htm
>> >>
>> >> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area
>> >> DBAs.
>> >>
>> >> www.experts-exchange.com - experts compete for points to answer your
>> >> questions
>> >>
>> >>
>> >> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
>> >> news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
>> >> >I would like to offer SQL Database with my shared hosting and don't
>> >> >know
>> >> >how
>> >> > to do this. Please note that both SQL and IIS are in the same
>> >> > machine.
>> >> > I
>> >> > appriciate any help on this.
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Mike
>> >>
>> >>
>> >>
>>|||Thanks but how can I change that port on my server?
"Kevin3NF" wrote:
> For security reasons, you may want to consider changing the default port
> that SQL Server listens on to something other than 1433, since every script
> kiddie on the planet knows that one...
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:DED2207A-8934-485D-A944-67D7D8C43557@.microsoft.com...
> > Thank you very much. I created a SQL user and opened the firewall port and
> > it's working now :)
> >
> > "Kevin3NF" wrote:
> >
> >> First off, if you are a web host, you would be using SQL Server logins,
> >> not
> >> Active Directory.
> >>
> >> Remote connections more than likely need to be done via IP address, and
> >> the
> >> correct port opened through the firewall.
> >>
> >> --
> >> Kevin Hill
> >> President
> >> 3NF Consulting
> >>
> >> www.3nf-inc.com/NewsGroups.htm
> >>
> >> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> >>
> >> www.experts-exchange.com - experts compete for points to answer your
> >> questions
> >>
> >>
> >> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> >> news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...
> >> > Thanks Kevin for the quick reply.
> >> >
> >> > I already had a user to give the rights to for this particular
> >> > database.
> >> >
> >> > So after reading your post I went into SQL Server Enterprise Manager
> >> > and
> >> > created an empty database for that user. Then under Users of that
> >> > database
> >> > I
> >> > added the user from the Active Directory. I gave this user public and
> >> > db_owner role.
> >> >
> >> > I tried to connect to this database remotely and I'm getting below
> >> > error:
> >> >
> >> > Connection failed:
> >> > SQLState: '01000'
> >> > SQL Server Error: 53
> >> > [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
> >> > (Connect()).
> >> > Connection failed:
> >> > SQLState: '08001'
> >> > SQL Server Error: 17
> >> > [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist
> >> > or
> >> > access deined.
> >> >
> >> > Can you please advice me? Thank you very much.
> >> >
> >> >
> >> > "Kevin3NF" wrote:
> >> >
> >> >> In a nutshell, you create a blank database for each customer, create a
> >> >> user
> >> >> account that has dbo rights to that database (and no rights to any
> >> >> other),
> >> >> and for goodness sake...make sure you back it up for them.
> >> >>
> >> >> By the way...limit the number of databases, keep an eye on the usage
> >> >> and
> >> >> performance of the server, and please make sure you call Microsoft to
> >> >> ensure
> >> >> you have the proper licensing fees paid. Failure to do this opens you
> >> >> up
> >> >> to
> >> >> legal liabililty.
> >> >>
> >> >> Having IIS and SQL on the same box and doing shared hosting is a
> >> >> really
> >> >> bad
> >> >> idea. Are you sure you are ready to go into SQL Server hosting?
> >> >>
> >> >> --
> >> >> Kevin Hill
> >> >> President
> >> >> 3NF Consulting
> >> >>
> >> >> www.3nf-inc.com/NewsGroups.htm
> >> >>
> >> >> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area
> >> >> DBAs.
> >> >>
> >> >> www.experts-exchange.com - experts compete for points to answer your
> >> >> questions
> >> >>
> >> >>
> >> >> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> >> >> news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
> >> >> >I would like to offer SQL Database with my shared hosting and don't
> >> >> >know
> >> >> >how
> >> >> > to do this. Please note that both SQL and IIS are in the same
> >> >> > machine.
> >> >> > I
> >> >> > appriciate any help on this.
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Mike
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||Look at the server network utility, tcp parameters. New port number takes
effect when you restart the SQL Server service
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:4C7E4EA5-E9AA-4C22-BE8C-96FE2DDE67A2@.microsoft.com...
> Thanks but how can I change that port on my server?
> "Kevin3NF" wrote:
>> For security reasons, you may want to consider changing the default port
>> that SQL Server listens on to something other than 1433, since every
>> script
>> kiddie on the planet knows that one...
>> --
>> Kevin Hill
>> President
>> 3NF Consulting
>> www.3nf-inc.com/NewsGroups.htm
>> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
>> www.experts-exchange.com - experts compete for points to answer your
>> questions
>>
>> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
>> news:DED2207A-8934-485D-A944-67D7D8C43557@.microsoft.com...
>> > Thank you very much. I created a SQL user and opened the firewall port
>> > and
>> > it's working now :)
>> >
>> > "Kevin3NF" wrote:
>> >
>> >> First off, if you are a web host, you would be using SQL Server
>> >> logins,
>> >> not
>> >> Active Directory.
>> >>
>> >> Remote connections more than likely need to be done via IP address,
>> >> and
>> >> the
>> >> correct port opened through the firewall.
>> >>
>> >> --
>> >> Kevin Hill
>> >> President
>> >> 3NF Consulting
>> >>
>> >> www.3nf-inc.com/NewsGroups.htm
>> >>
>> >> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area
>> >> DBAs.
>> >>
>> >> www.experts-exchange.com - experts compete for points to answer your
>> >> questions
>> >>
>> >>
>> >> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
>> >> news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...
>> >> > Thanks Kevin for the quick reply.
>> >> >
>> >> > I already had a user to give the rights to for this particular
>> >> > database.
>> >> >
>> >> > So after reading your post I went into SQL Server Enterprise Manager
>> >> > and
>> >> > created an empty database for that user. Then under Users of that
>> >> > database
>> >> > I
>> >> > added the user from the Active Directory. I gave this user public
>> >> > and
>> >> > db_owner role.
>> >> >
>> >> > I tried to connect to this database remotely and I'm getting below
>> >> > error:
>> >> >
>> >> > Connection failed:
>> >> > SQLState: '01000'
>> >> > SQL Server Error: 53
>> >> > [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
>> >> > (Connect()).
>> >> > Connection failed:
>> >> > SQLState: '08001'
>> >> > SQL Server Error: 17
>> >> > [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
>> >> > exist
>> >> > or
>> >> > access deined.
>> >> >
>> >> > Can you please advice me? Thank you very much.
>> >> >
>> >> >
>> >> > "Kevin3NF" wrote:
>> >> >
>> >> >> In a nutshell, you create a blank database for each customer,
>> >> >> create a
>> >> >> user
>> >> >> account that has dbo rights to that database (and no rights to any
>> >> >> other),
>> >> >> and for goodness sake...make sure you back it up for them.
>> >> >>
>> >> >> By the way...limit the number of databases, keep an eye on the
>> >> >> usage
>> >> >> and
>> >> >> performance of the server, and please make sure you call Microsoft
>> >> >> to
>> >> >> ensure
>> >> >> you have the proper licensing fees paid. Failure to do this opens
>> >> >> you
>> >> >> up
>> >> >> to
>> >> >> legal liabililty.
>> >> >>
>> >> >> Having IIS and SQL on the same box and doing shared hosting is a
>> >> >> really
>> >> >> bad
>> >> >> idea. Are you sure you are ready to go into SQL Server hosting?
>> >> >>
>> >> >> --
>> >> >> Kevin Hill
>> >> >> President
>> >> >> 3NF Consulting
>> >> >>
>> >> >> www.3nf-inc.com/NewsGroups.htm
>> >> >>
>> >> >> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area
>> >> >> DBAs.
>> >> >>
>> >> >> www.experts-exchange.com - experts compete for points to answer
>> >> >> your
>> >> >> questions
>> >> >>
>> >> >>
>> >> >> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
>> >> >> news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
>> >> >> >I would like to offer SQL Database with my shared hosting and
>> >> >> >don't
>> >> >> >know
>> >> >> >how
>> >> >> > to do this. Please note that both SQL and IIS are in the same
>> >> >> > machine.
>> >> >> > I
>> >> >> > appriciate any help on this.
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Mike
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>

How to setup a SQL Database for a shared web hosting?

I would like to offer SQL Database with my shared hosting and don't know how
to do this. Please note that both SQL and IIS are in the same machine. I
appriciate any help on this.
Thanks,
Mike
In a nutshell, you create a blank database for each customer, create a user
account that has dbo rights to that database (and no rights to any other),
and for goodness sake...make sure you back it up for them.
By the way...limit the number of databases, keep an eye on the usage and
performance of the server, and please make sure you call Microsoft to ensure
you have the proper licensing fees paid. Failure to do this opens you up to
legal liabililty.
Having IIS and SQL on the same box and doing shared hosting is a really bad
idea. Are you sure you are ready to go into SQL Server hosting?
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
>I would like to offer SQL Database with my shared hosting and don't know
>how
> to do this. Please note that both SQL and IIS are in the same machine. I
> appriciate any help on this.
> Thanks,
> Mike
|||Thanks Kevin for the quick reply.
I already had a user to give the rights to for this particular database.
So after reading your post I went into SQL Server Enterprise Manager and
created an empty database for that user. Then under Users of that database I
added the user from the Active Directory. I gave this user public and
db_owner role.
I tried to connect to this database remotely and I'm getting below error:
Connection failed:
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access deined.
Can you please advice me? Thank you very much.
"Kevin3NF" wrote:

> In a nutshell, you create a blank database for each customer, create a user
> account that has dbo rights to that database (and no rights to any other),
> and for goodness sake...make sure you back it up for them.
> By the way...limit the number of databases, keep an eye on the usage and
> performance of the server, and please make sure you call Microsoft to ensure
> you have the proper licensing fees paid. Failure to do this opens you up to
> legal liabililty.
> Having IIS and SQL on the same box and doing shared hosting is a really bad
> idea. Are you sure you are ready to go into SQL Server hosting?
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
>
>
|||First off, if you are a web host, you would be using SQL Server logins, not
Active Directory.
Remote connections more than likely need to be done via IP address, and the
correct port opened through the firewall.
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...[vbcol=seagreen]
> Thanks Kevin for the quick reply.
> I already had a user to give the rights to for this particular database.
> So after reading your post I went into SQL Server Enterprise Manager and
> created an empty database for that user. Then under Users of that database
> I
> added the user from the Active Directory. I gave this user public and
> db_owner role.
> I tried to connect to this database remotely and I'm getting below error:
> Connection failed:
> SQLState: '01000'
> SQL Server Error: 53
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 17
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> access deined.
> Can you please advice me? Thank you very much.
>
> "Kevin3NF" wrote:
|||Thank you very much. I created a SQL user and opened the firewall port and
it's working now
"Kevin3NF" wrote:

> First off, if you are a web host, you would be using SQL Server logins, not
> Active Directory.
> Remote connections more than likely need to be done via IP address, and the
> correct port opened through the firewall.
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...
>
>
|||For security reasons, you may want to consider changing the default port
that SQL Server listens on to something other than 1433, since every script
kiddie on the planet knows that one...
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:DED2207A-8934-485D-A944-67D7D8C43557@.microsoft.com...[vbcol=seagreen]
> Thank you very much. I created a SQL user and opened the firewall port and
> it's working now
> "Kevin3NF" wrote:
|||Thanks but how can I change that port on my server?
"Kevin3NF" wrote:

> For security reasons, you may want to consider changing the default port
> that SQL Server listens on to something other than 1433, since every script
> kiddie on the planet knows that one...
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:DED2207A-8934-485D-A944-67D7D8C43557@.microsoft.com...
>
>
|||Look at the server network utility, tcp parameters. New port number takes
effect when you restart the SQL Server service
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:4C7E4EA5-E9AA-4C22-BE8C-96FE2DDE67A2@.microsoft.com...[vbcol=seagreen]
> Thanks but how can I change that port on my server?
> "Kevin3NF" wrote:

How to setup a SQL Database for a shared web hosting?

I would like to offer SQL Database with my shared hosting and don't know how
to do this. Please note that both SQL and IIS are in the same machine. I
appriciate any help on this.
Thanks,
MikeIn a nutshell, you create a blank database for each customer, create a user
account that has dbo rights to that database (and no rights to any other),
and for goodness sake...make sure you back it up for them.
By the way...limit the number of databases, keep an eye on the usage and
performance of the server, and please make sure you call Microsoft to ensure
you have the proper licensing fees paid. Failure to do this opens you up to
legal liabililty.
Having IIS and SQL on the same box and doing shared hosting is a really bad
idea. Are you sure you are ready to go into SQL Server hosting?
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
>I would like to offer SQL Database with my shared hosting and don't know
>how
> to do this. Please note that both SQL and IIS are in the same machine. I
> appriciate any help on this.
> Thanks,
> Mike|||Thanks Kevin for the quick reply.
I already had a user to give the rights to for this particular database.
So after reading your post I went into SQL Server Enterprise Manager and
created an empty database for that user. Then under Users of that database I
added the user from the Active Directory. I gave this user public and
db_owner role.
I tried to connect to this database remotely and I'm getting below error:
Connection failed:
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Con
nect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist or
access deined.
Can you please advice me? Thank you very much.
"Kevin3NF" wrote:

> In a nutshell, you create a blank database for each customer, create a use
r
> account that has dbo rights to that database (and no rights to any other),
> and for goodness sake...make sure you back it up for them.
> By the way...limit the number of databases, keep an eye on the usage and
> performance of the server, and please make sure you call Microsoft to ensu
re
> you have the proper licensing fees paid. Failure to do this opens you up
to
> legal liabililty.
> Having IIS and SQL on the same box and doing shared hosting is a really ba
d
> idea. Are you sure you are ready to go into SQL Server hosting?
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:90A6A1EC-E3F6-4268-B938-5CAC626030D2@.microsoft.com...
>
>|||First off, if you are a web host, you would be using SQL Server logins, not
Active Directory.
Remote connections more than likely need to be done via IP address, and the
correct port opened through the firewall.
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...[vbcol=seagreen]
> Thanks Kevin for the quick reply.
> I already had a user to give the rights to for this particular database.
> So after reading your post I went into SQL Server Enterprise Manager and
> created an empty database for that user. Then under Users of that database
> I
> added the user from the Active Directory. I gave this user public and
> db_owner role.
> I tried to connect to this database remotely and I'm getting below error:
> Connection failed:
> SQLState: '01000'
> SQL Server Error: 53
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (C
onnect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 17
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does n
ot exist or
> access deined.
> Can you please advice me? Thank you very much.
>
> "Kevin3NF" wrote:
>|||Thank you very much. I created a SQL user and opened the firewall port and
it's working now
"Kevin3NF" wrote:

> First off, if you are a web host, you would be using SQL Server logins, no
t
> Active Directory.
> Remote connections more than likely need to be done via IP address, and th
e
> correct port opened through the firewall.
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:09F06CF0-4A01-4B7C-97A0-902667EAE649@.microsoft.com...
>
>|||For security reasons, you may want to consider changing the default port
that SQL Server listens on to something other than 1433, since every script
kiddie on the planet knows that one...
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:DED2207A-8934-485D-A944-67D7D8C43557@.microsoft.com...[vbcol=seagreen]
> Thank you very much. I created a SQL user and opened the firewall port and
> it's working now
> "Kevin3NF" wrote:
>|||Thanks but how can I change that port on my server?
"Kevin3NF" wrote:

> For security reasons, you may want to consider changing the default port
> that SQL Server listens on to something other than 1433, since every scrip
t
> kiddie on the planet knows that one...
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Mike R." <MikeR@.discussions.microsoft.com> wrote in message
> news:DED2207A-8934-485D-A944-67D7D8C43557@.microsoft.com...
>
>|||Look at the server network utility, tcp parameters. New port number takes
effect when you restart the SQL Server service
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Mike R." <MikeR@.discussions.microsoft.com> wrote in message
news:4C7E4EA5-E9AA-4C22-BE8C-96FE2DDE67A2@.microsoft.com...[vbcol=seagreen]
> Thanks but how can I change that port on my server?
> "Kevin3NF" wrote:
>

Monday, March 19, 2012

How to set up an .mdf db?

Would someone please take a minute to give me a step by step how to add an .mdf db to a web app(VS 2k5 Pro with SSE)?

Only one app in the project intended as a complete sample solution to be zipped and distributed to people who would have a similar VS setup. The idea is the recipients to be able to open the .mdf (or the pages using it) right out of the box without having to go to hell and back. The .mdf included in the App_Data and the connection specified in the web.config. All ready to just unzip and go.

Obviously, it would have to be sql authentication.
Say user: johndoe/ pw: 123456

Amazing how the db connection process still has a way of bringing otherwise intelligent people to their knees.

TIA

Step 1 - New web Site :-)

Step 2 - Open Server Explorer (Ctrl W,L)

Step 3 - Right Click Data Connections and Choose Add Connection

Step 4 - Change the Data Source to be a Microsoft Sql Server Database File using the Change button

Step 5 - Use the Browse button to create a new MDF file in your App_Data folder.

Step 6 - Now you should get a dialog asking if you want to create the file. Press Yes and you should now have a Data Connection in server explorer which you can use.

Hope that helps

|||

Forgot to say that between step 5 and 6 you should select SQL authentication instead of windows authentication.

|||

Hi James,

Thanks for taking the time. I also thought that is what it takes before I started playing with SSE.
The steps you listed only work for windows authentication mode. If I select SQL authentication I get an arror:

Login failed for user '<mylogin>'. The user is not associated with a trusted SQL Server connection.

I tried all kinds of<mylogin>values Administrator, the current login, totally nonexistent names... They all give the same error. The idea is to put in a username/pw that have nothing to do with my machine. Isn't that the point of file based db (unless we are expected to deploy on the dev machine)? Anyway, it rejects all of them indiscriminately.

Back in sql 2k, this error was associated with not setting up globally the authentication mode of the server instance to either mixed or just sql.

With SSE there is no concept of multiple instances or global server settings for authentication, like with the full versions. I had installed VS a couple of months ago and there is no place in the options that shows the current configuration. So I uninstalled SSE just to go through the install all over again. Well, it just rolled along automatically. I didn't see anywhere during the install to set up the server. I assumed that was being done at the file level, as the GUI suggests.


Something just doesn't add up.

|||

Rob

All becomes clear. The default setup for VS2005 Express is to only support windows authentication. The setup doesn't allow you to change this during the graphic stage, you have to start setup with the correct command switch. The good news is that you can change it to mixed mode with a bit of registry hacking.

See thisknowledge base. Hopefully that should get you on the way.

Cheers

|||

Thanks James.

This only partly solves the problem. The recipients of the sample project will also face an issue connecting.

Am I misunderstanding the puspose of .mdf files? They do not seem to be transportable databases from one machine to another like Access. I can't expect everyone I send a sample project to hack their registry, just to try the sample. Most installs out there are exactly like mine - done from the setup media, thus default windows authentication mode. Why did they even bother showing the other modes in the GUI?

If I have to hack the registry to get a basic functionality I am by definition misusing the ptoduct. What is the right way to accomplish this, what I thought was a simple and popular, task? Namely to send a one page example along with a db all packaged together?

Using Access instead is not the same. Many features are different.Embedding SSE is a huge job too, and not really pertinent to web apps anyway.

|||

I only mentioned the registry hack for your machine.

If you install SQL Server Express with the switch SECURITYMODE=SQL then it will be in Mixed mode authentication.

Then you can ship the mdf file. This article has a good story about how to embed Server 2005 with your app -http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/EmSQLExCustApp.asp

Cheers

James

|||

Yes, I am aware of this article about embedding. As I said it is not straight forward and it does not pertain to the simple scenario I describe.

OK. Clean new xp sp2 OS install.
Clean new NAMED instance SSE install with mixed authentication mode specified at setup.

I still get the exact same error, if I try to create a new .mdf with sql authenitcation.

What gives?

|||

1) New website.

2) Right click "App_data" in solution explorer.

3) Click "Add new item"

4) Click "SQL Database".

5) Click "Ok".

Is there something wrong with this particular setup that isn't working for you?

If you then drag a SqlDataSource to your webpage, and select the connection property, one of the entries in the dropdown should be "database.mdf", select that. If you then go to the .aspx source, you should see that the connection string it is using is:

ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"

There is no mention of the machine name, or the project directory in there, and you can just .zip the project folder, give it to someone else, and they can use it immediately.

|||

ok. So an .mdf with just windows authentication works on any machine it is on.

I still have to digest the sucurity implications, but for now insecure is exactly what I need so ticket closed!

Thanks to everybody.

|||

I recently re-installed visual studio 2005. Since that time I have not been able to connect to .mdf files or create them in the App_Data directory. I receive the "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." error. Anybody have any ideas as to what is causing this?

Thanks

How to set this up?

I need to set up the security on the Reporting Services such that user can
view the reports ONLY through a ReportViewer control on a asp.net web page
ie not allow to navigate all other folders or areas in the Report Manager.
Reporting services is installed on a stand alone server (not belong to any
domain, no AD set up) running on Windows 2003 server. Currently I configured
the "Report Manager" and "ReportServer" web site to allow annonyous access.
However some users know how to bypass the web application and directly enter
the IP address/reports of the stand alone server to view all the reports.
The asp.net page has built-in security to filter out the reports listed on
the page based on the user login and password. This web application is also
hosted at the stand alone server and is connected to a remote Sql server.
The web application is using the sql security.I have a similar problem and cannot find a solution provided by Microsoft.
However, I decidee to solve it by a trick. I develop an ASP.net web
application and the application have some report printing function. Whenever
a report is printed, a random key will be inserted into a database table
like this:
Key User
KE#n-asdfjk-ad33klj-kasjd WBush
The key and user are also passed in the query string. When the report is
run, the key and user will be checked again in the stored procedure to
verify that this user can print this report.
I am not sure whether this is a good solution, but I think that's what we
can do before Microsoft can provide a better solution.
"Paul" <paul_mak@.hotmail.com> wrote in message
news:eWZLuvhdGHA.2456@.TK2MSFTNGP04.phx.gbl...
> I need to set up the security on the Reporting Services such that user can
> view the reports ONLY through a ReportViewer control on a asp.net web page
> ie not allow to navigate all other folders or areas in the Report Manager.
> Reporting services is installed on a stand alone server (not belong to any
> domain, no AD set up) running on Windows 2003 server. Currently I
configured
> the "Report Manager" and "ReportServer" web site to allow annonyous
access.
> However some users know how to bypass the web application and directly
enter
> the IP address/reports of the stand alone server to view all the reports.
> The asp.net page has built-in security to filter out the reports listed on
> the page based on the user login and password. This web application is
also
> hosted at the stand alone server and is connected to a remote Sql server.
> The web application is using the sql security.
>|||Hi Paul.
The only way I know of is to have your web site's app pool use an identity
that is the only identity that is allowed to hit the reports.
For example, you might set up a service account called "WebApp1SvcAcct".
give that account and administrators group privileges in reporting services,
but not the rest of your users. This might be only half the solution. It's
been a while since we've had to deal with this.
-Tim
"Paul" <paul_mak@.hotmail.com> wrote in message
news:eWZLuvhdGHA.2456@.TK2MSFTNGP04.phx.gbl...
>I need to set up the security on the Reporting Services such that user can
>view the reports ONLY through a ReportViewer control on a asp.net web page
>ie not allow to navigate all other folders or areas in the Report Manager.
>Reporting services is installed on a stand alone server (not belong to any
>domain, no AD set up) running on Windows 2003 server. Currently I
>configured the "Report Manager" and "ReportServer" web site to allow
>annonyous access. However some users know how to bypass the web application
>and directly enter the IP address/reports of the stand alone server to view
>all the reports. The asp.net page has built-in security to filter out the
>reports listed on the page based on the user login and password. This web
>application is also hosted at the stand alone server and is connected to a
>remote Sql server. The web application is using the sql security.
>

How to set the REDO_QUEUE size?

I have found some article on the web talking about how to change the REDO_QUEUE size like "ALTER DATABASE [AdventureWorks] SET PARTNER REDO_QUEUE 100MB;"

http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx

When I run it, the result is "Incorrect syntax near 'REDO_QUEUE'."

I have query for the Books online and there is no REDO_QUEUE there.

I also found "The only supported value for a mirrored database is the UNLIMITED value" on the MS KB http://support.microsoft.com/kb/907741

Is this comment obsoleted?

Thanks.

You can not set the redo queue.

|||

Hi, since we want to limit the size that is occuiped by the db mirroring to prevent the computer "hang" due to no free hard disk space, is there any other way to set the size limit?

Thanks in advance.

Friday, March 9, 2012

How to set ReportViewer DataSource to a Custom Collection in Another Project

I have a web site that uses a business logic layer (BLL) and a data access layer (DAL). The BLL is in a separate project. The DAL is in a separate project. The web site has a reference to the BLL project and the BLLproject has a reference to the DAL project. Just to learn how to use the reportviewer control I used the server explorer to create a web datasource based directly on a stored procedure and everything works just fine. However, now I want to reportviewer to be based on a method in my BLL project. My problem is that the web data source window only shows those methods that have not paramenters. I want it to show CovAdm.BLL.InitialInspectionMgr.LoadDataTableForParcelID which has one parameter for ParcelID and returns a datatable. How do I get this method to show up under the CovAdm.BLL item in the web data sources window?

I found what I think is a simpler and better solution, especially because the reportviewer control seems be a long way from WYSIWYG. My solution doesn't use a report viewer control at all. Here's what I did.

My web page has a formview control with a "Report" button. The formview control itemcommand event checks for which button has been clicked and executes the following code behind for the Report button:
' get the data
Dim bll As New CovAdm.BLL.InitialInspectionMgr
Dim col As CovAdm.BLL.InitialInspectionCollection
Dim lngParcelID As Long = MySession.ParcelSearchResultDetailParcelID(Session)
col = bll.LoadForParcelID(lngParcelID, "ParcelID", "ASC")
' use the default file name for cases that have no file name
' use a physical path because local reports don't work with virtual paths
For Each ii As CovAdm.BLL.InitialInspection In col
If String.IsNullOrEmpty(ii.FQPhotoFileName) Then
Dim str As String = AppConfigurationMgr.PhotoNotAvailableRelativeFile()
str = Server.MapPath(str)
ii.FQPhotoFileName = str
End If
Next
' set up the report
Dim lr As New Microsoft.Reporting.WebForms.LocalReport
lr.ReportPath = Server.MapPath("~/Home/Report/rptInitialInspection.rdlc")
lr.EnableExternalImages = True
lr.DataSources.Clear()
' make sure we use the correct data source name
Dim rds As New Microsoft.Reporting.WebForms.ReportDataSource("dsrptInitialInspection_dtrptInitialInspection", col)
lr.DataSources.Add(rds)
' show the file dialog for opening or saving the pdf verion of the report
Utility.ShowLocalReport(Response, lr)

The code from my Utility class is shown below:
Public Shared Sub ShowLocalReport _
( _
ByVal vResponse As System.Web.HttpResponse, _
ByVal vlr As Microsoft.Reporting.WebForms.LocalReport _
)
'
' Aruments
' ========
' vResponse - HttpResponse object from calling page
' vlr - LocalReport object from calling page
'
' the procedure is currently limited to PDF format
Dim strFormat As String = "PDF"
Dim strMimeType As String = Nothing
Dim strEncoding As String = Nothing
Dim strFileExt As String = Nothing
' the default filename for saving will be the name if the rdlc file
Dim strFileName As String = System.IO.Path.GetFileNameWithoutExtension(vlr.ReportPath)
Dim astrStream() As String
Dim aWarning() As Microsoft.Reporting.WebForms.Warning
Dim aBytes As Byte()
' render the report
aBytes = vlr.Render(strFormat, Nothing, strMimeType, strEncoding, strFileExt, astrStream, aWarning)
' show the open / save dialog
vResponse.Clear()
vResponse.ContentType = "application/" & strFormat
vResponse.AddHeader("content-disposition", "attachment; filename=" & strFileName & "." & strFileExt)
vResponse.BinaryWrite(aBytes)
vResponse.End()
End Sub

How to set NT Authority in sql 2000?

We have an application store in a web server using IIS 6.0, however the application is communicating to sql 2000 that is stored in a 2000 server.

In IIS 6.0 the application pool is set to Network Services, therefore sql 2000 is looking for a user called 'NT AUTHORITY\ANONYMOUS LOGON'.

But the login failed, and I don't see how to add NT Authority as a user in a 2000 server like you can in a 2003 server.

In all, we are trying to set permissions to certain users only by using the identity impersonate='true' in the web config file, but even with this setting set to true, and our network information set as a user in sql 2000, we still are denied access to the data.

What are some things we need to look for and what configuration do we need to set?

Thanks,

xyz789

P.S.
We also have all the permissions check to have access to all the tables and store procedures for each user.

Hi,

Are you trying integrated security and impersonating the current asp.net user?

Remove the anonymous access from IIS. Make sure in the authentication, only 'Integrated Windows
authentication' is checked.

You may need kerberos authentication.

http://msdn.microsoft.com/msdnmag/issues/05/09/SecurityBriefs/

HTH,
Suprotim Agarwal

--
http://www.dotnetcurry.com
--


|||

Thank you!

How to set my ASP.NET application to access SQL Server 2005 using clients user credentials

Hi guys,

I'm not sure if I'm just bad at googling but I can't seem to find a way to set an ASP.NET 2.0 web application to connect to SQL Server 2005 using the current client's user credentials. My web application is using Integrated Windows Authentication so its Page.User.Identity is set to a DOMAIN\username value... I want to pass that to my connectionstring or have my connections pick up the identity automatically and use that Identity when accessing the db server.

Oh and another thing, my IIS Application Pool is using a specific Identity itself, so I don't know if that might affect the above.

Hope someone could help.

Hi,

what you need is process impersonation, that allows asp.net to switch the execute owner to an other user. I have used this for asp.net and remoting calls, so that i have the original caller. I have two links for you:

http://msdn2.microsoft.com/en-us/library/ms998292.aspx|||Thanks Zhou. I'll the articles out once I get my hands on our dev server.Stick out tongue Thanks.

Wednesday, March 7, 2012

How to set fill factor?

Hellow, everyone"
I have a web online table that is inserted about 1500 record one day. Each night, a DST is running to pull all data to anther database. How to set fill factor on a one column index to get the best performance? Current fill factor is 80%.
Thanks
ZYTYou are having performance issues with just 1500 records per day?|||You are having performance issues with just 1500 records per day?

Yes, about 1500 records everyday. This table has not been maintained about five years. Someone created it that time. I take over and want to imporve performance.

ZYT|||I'm not really into the fill factor thing. In fact I'm still learing my way in SQL Server.

Also, I really don't know if setting a fill factor would benefit your particular case. However, as far as I know, you should be able to determine the fill factor (0-100) of a particular index by using the ALTER INDEX command.

Not really sure if this was the answer you were looking for. There's the chance that I didn't understand your question.

Best regards.|||Well, lets have the whole story then. Post the DDL for the table, along with any indexes on it.
Also, how many records are in it?|||Keep in mind fillfactor only comes into play at the time you create the index, or rebuild the index. It has absolutely nothing to do with how the data is maintained over time.|||Do you defrag/rebuild indexes regularly, let's say based on that volume, every couple of weeks ?|||You are having performance issues with just 1500 records per day?If I may - the nature of the records inserted bares some scrutiny. We had a guy on recently (I forget who) who's records averaged 4KB per record. As such I agree - we need to at least see the DDL to get an idea of what might be inserted.

We could also do with knowing if rows are likely to be updated regularly (and if those updates are likely to dramatically change the size of the rows).

...and finally - we need to know (as MCrowley says) what the reindexing processes are for this table.

@.OP - there is a lot of factors that determine the optimum fillfactor. Please provide the information requested :)