Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Friday, March 30, 2012

problem running vb.net application with sqlexpress in system with only .NET FRAMEWORK

Hi,

I have developed a stand alone application that get data from excel and dumps it in local database (sql server database primary data file) in visual studio .net 2005. I had no issues while developing the application. When i am trying to install this application in the standalone system with .net framework 2.0 and no backend database it giving the following error

provider: sql network interfaces, error 26 - Error locating Server/ Instance Specified

connection string i am using is

Dim objLocalDB As System.Data.SqlClient.SqlConnection

objLocalDB = New System.Data.SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=" & System.AppDomain.CurrentDomain.BaseDirectory & "LFDB.mdf;Integrated Security=True;User Instance=True")

I dont want to use any backend database. I only want to use the database that comes with .net (i.e sqlexpress)

Please help me how can i get through this problem.

hi,

Manyam wrote:

When i am trying to install this application in the standalone system with .net framework 2.0 and no backend database it giving the following error

provider: sql network interfaces, error 26 - Error locating Server/ Instance Specified

I can't understand if you installed SQLExpress as well, on the target computer... did you?

regards

|||SQL Server Express is a backend database although the GUI tools are more lightweight than the ones of the more bigger editions. If you want to use user instances as mentioned in the connection string, you will need to have a SQL Server Express Service in place to attach the database to the Service. SQL Server Express can be deployed within your application (even through clickonce deplyoment but at the end need to be installed).

HTH, Jens K. Suessmeyer.

http://www.sqlserver0205.de
|||

Manyam wrote:

I dont want to use any backend database. I only want to use the database that comes with .net (i.e sqlexpress)

Please help me how can i get through this problem.

SQL Express is not part of the .NET Framework, it is a completely separate product that must be installed if you are going to use it. You can add SQL Express as a prerequisite to you application installation automatically using either ClickOnce or standard Setup Projects in VS 2005, in your projects properties, click the Prerequisite button and make sure SQL Express is checked in the list. This will automatically include the SQL Express installer in your deployment and install it on the target computer if it is needed.

Mike

|||

Hi,

Thanks for your suggestion. So we cannot run vb.net application that is developed using sql server management studio without SQL EXPRESS and only .net framework.

I tried to open the link provided by you. Its not opening. I am getting page cannot be displayed.

|||

Hi,

Thanks for your valueable suggestion. So i cannot run a vb application developed using sql server management studio without SQL EXPRESS.I tried installing SQL EXPRESS in standalone system, but its giving issues.

Process followed -->

Uninstalled existing framework.

Installed .NET framework 2.0Dowloaded SQLEXPRESS and istalled in system.

Its throwing a error that .net should require some updates... What updates do we need to install to get this working.

Thanks in advance.

|||What's your OS? If WIndows XP Pro, this needs SP2 and updated security patches

Wednesday, March 28, 2012

Problem Report Viewer Control

I am having an authentication problem using the Report Viewer Control. The
situation is that I have developed a simple ASP.NET application that will
used as an interface for Report Viewing. First, I have a TreeView Control
located on the default page that is being populated with the current reports
that are published on the Report Server. Second, I have a aspx page called
ReportViewer that holds the Report Viewer Control. Third, when a user clicks
on one of the reports in the TreeView control the report is generated in an
IFrame located in a table cell on the default page.
My Problem is that everytime I click to generate a report I am asked for
windows credentials. I am passing the full network credentials(testing
environment going to use an application pool when live and pass default
credentials) example System.Net.NetworkCredential("username", "password",
"domain") in the load event of both aspx pages and IIS directory security is
setup with anonymous access & integrated windows authentication(I have tried
about everything in IIS Directory Security). I have tried about everything
and for the life of me cannot get around this issue any assistance would be
greatly appreciated.
Thanks,
--
Andrew
MCSA,MCDBAIf your asp app is on a different machine then I think you are hitting the
double hop issue. You need to be using Kerberos to support double hop. This
is an IIS issue. Here is a good link:
http://support.microsoft.com/default.aspx?scid=kb;en-us;264921
I notice that you have enable anonymous on IIS where RS is located. This is
a bad idea. It will cause difficulties with managing Report Server. Either
you need to setup your security using Kerberos or you will have to implement
forms based authentication. If there is another way around it I am not sure
what it would be.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Andrew" <Andrew@.discussions.microsoft.com> wrote in message
news:60F64653-3B04-4E3C-9ADA-D06A191AB9EE@.microsoft.com...
>I am having an authentication problem using the Report Viewer Control. The
> situation is that I have developed a simple ASP.NET application that will
> used as an interface for Report Viewing. First, I have a TreeView Control
> located on the default page that is being populated with the current
> reports
> that are published on the Report Server. Second, I have a aspx page called
> ReportViewer that holds the Report Viewer Control. Third, when a user
> clicks
> on one of the reports in the TreeView control the report is generated in
> an
> IFrame located in a table cell on the default page.
> My Problem is that everytime I click to generate a report I am asked for
> windows credentials. I am passing the full network credentials(testing
> environment going to use an application pool when live and pass default
> credentials) example System.Net.NetworkCredential("username", "password",
> "domain") in the load event of both aspx pages and IIS directory security
> is
> setup with anonymous access & integrated windows authentication(I have
> tried
> about everything in IIS Directory Security). I have tried about everything
> and for the life of me cannot get around this issue any assistance would
> be
> greatly appreciated.
> Thanks,
> --
> Andrew
> MCSA,MCDBA|||Bruce,
Thanks for the response and I am just using windows authentication on the
live report server. I enabled the anonymous access in a testing environment
just to try to get around the authentication problems I was encountering. My
issue was that I am developing in a different domain and I am accessing the
report server by IP address. Well when I implemented the application on the
production domain I never changed the report server path to the actual report
server machine name and this caused my authentication problem. Just one of
those little slip ups that seem to cause the biggest problems. Thanks,
--
Andrew
MCSA,MCDBA
--
Andrew
MCSA,MCDBA
"Bruce L-C [MVP]" wrote:
> If your asp app is on a different machine then I think you are hitting the
> double hop issue. You need to be using Kerberos to support double hop. This
> is an IIS issue. Here is a good link:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;264921
> I notice that you have enable anonymous on IIS where RS is located. This is
> a bad idea. It will cause difficulties with managing Report Server. Either
> you need to setup your security using Kerberos or you will have to implement
> forms based authentication. If there is another way around it I am not sure
> what it would be.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Andrew" <Andrew@.discussions.microsoft.com> wrote in message
> news:60F64653-3B04-4E3C-9ADA-D06A191AB9EE@.microsoft.com...
> >I am having an authentication problem using the Report Viewer Control. The
> > situation is that I have developed a simple ASP.NET application that will
> > used as an interface for Report Viewing. First, I have a TreeView Control
> > located on the default page that is being populated with the current
> > reports
> > that are published on the Report Server. Second, I have a aspx page called
> > ReportViewer that holds the Report Viewer Control. Third, when a user
> > clicks
> > on one of the reports in the TreeView control the report is generated in
> > an
> > IFrame located in a table cell on the default page.
> >
> > My Problem is that everytime I click to generate a report I am asked for
> > windows credentials. I am passing the full network credentials(testing
> > environment going to use an application pool when live and pass default
> > credentials) example System.Net.NetworkCredential("username", "password",
> > "domain") in the load event of both aspx pages and IIS directory security
> > is
> > setup with anonymous access & integrated windows authentication(I have
> > tried
> > about everything in IIS Directory Security). I have tried about everything
> > and for the life of me cannot get around this issue any assistance would
> > be
> > greatly appreciated.
> >
> > Thanks,
> >
> > --
> > Andrew
> > MCSA,MCDBA
>
>|||Ahh, same symptom as double hop but different reason. Glad you got it figure
out.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Andrew" <Andrew@.discussions.microsoft.com> wrote in message
news:28AC4137-F5A4-4F09-8B00-80126775DBB6@.microsoft.com...
> Bruce,
> Thanks for the response and I am just using windows authentication on the
> live report server. I enabled the anonymous access in a testing
> environment
> just to try to get around the authentication problems I was encountering.
> My
> issue was that I am developing in a different domain and I am accessing
> the
> report server by IP address. Well when I implemented the application on
> the
> production domain I never changed the report server path to the actual
> report
> server machine name and this caused my authentication problem. Just one
> of
> those little slip ups that seem to cause the biggest problems. Thanks,
> --
> Andrew
> MCSA,MCDBA
> --
> Andrew
> MCSA,MCDBA
>
> "Bruce L-C [MVP]" wrote:
>> If your asp app is on a different machine then I think you are hitting
>> the
>> double hop issue. You need to be using Kerberos to support double hop.
>> This
>> is an IIS issue. Here is a good link:
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;264921
>> I notice that you have enable anonymous on IIS where RS is located. This
>> is
>> a bad idea. It will cause difficulties with managing Report Server.
>> Either
>> you need to setup your security using Kerberos or you will have to
>> implement
>> forms based authentication. If there is another way around it I am not
>> sure
>> what it would be.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>>
>> "Andrew" <Andrew@.discussions.microsoft.com> wrote in message
>> news:60F64653-3B04-4E3C-9ADA-D06A191AB9EE@.microsoft.com...
>> >I am having an authentication problem using the Report Viewer Control.
>> >The
>> > situation is that I have developed a simple ASP.NET application that
>> > will
>> > used as an interface for Report Viewing. First, I have a TreeView
>> > Control
>> > located on the default page that is being populated with the current
>> > reports
>> > that are published on the Report Server. Second, I have a aspx page
>> > called
>> > ReportViewer that holds the Report Viewer Control. Third, when a user
>> > clicks
>> > on one of the reports in the TreeView control the report is generated
>> > in
>> > an
>> > IFrame located in a table cell on the default page.
>> >
>> > My Problem is that everytime I click to generate a report I am asked
>> > for
>> > windows credentials. I am passing the full network credentials(testing
>> > environment going to use an application pool when live and pass default
>> > credentials) example System.Net.NetworkCredential("username",
>> > "password",
>> > "domain") in the load event of both aspx pages and IIS directory
>> > security
>> > is
>> > setup with anonymous access & integrated windows authentication(I have
>> > tried
>> > about everything in IIS Directory Security). I have tried about
>> > everything
>> > and for the life of me cannot get around this issue any assistance
>> > would
>> > be
>> > greatly appreciated.
>> >
>> > Thanks,
>> >
>> > --
>> > Andrew
>> > MCSA,MCDBA
>>|||Andrew wrote:
> Bruce,
> Thanks for the response and I am just using windows authentication on the
> live report server. I enabled the anonymous access in a testing environment
> just to try to get around the authentication problems I was encountering. My
> issue was that I am developing in a different domain and I am accessing the
> report server by IP address. Well when I implemented the application on the
> production domain I never changed the report server path to the actual report
> server machine name and this caused my authentication problem. Just one of
> those little slip ups that seem to cause the biggest problems. Thanks,
Andrew,
you will not be authenticated with IIS if you have anonymous access
enabled.Even if you pass credentials with
System.Net.NetworkCredential(user,pass,domain).

Tuesday, March 20, 2012

problem of uploading asp.net website on web server

i have developed a website using asp.net, c# withSQL SERVER EXPRESS EDITION 2005. The database is being used both for retreival and updation purpose. the website is working accordingly when i m running it on my system, ie., data is getting retreived from the database and it is also getting updated on button click. But when i m uloading my site on the httpdocs folder of web server, connectivity with database is failing miserably, ie neither getting retreived from the database nor getting updated. The error message displayed by the web server is given underneath. i have used Grid view for displaying data from the database and Details view for updating the database.

i have used window authentication for connecting with the database.

Please help me with finding out a solution for it. give me proper explanation and i need to do

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: 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)

smartymca:

this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections

Have you checked to see if this is the case or not? Simply pasting this error into google should show you how to do this.

|||

Hello smartymca,

I have recently uploaded my first ASP.NET website to the web, and I had exactly the same problem and error message. I found there were two reasons for this:

1. My hosting company require that my SQL Server database be located on a different server to the rest of my files! So check with your provider to see if your database needs to be in a specific place. I had to remove my database from my App_Data folder and recreate it on the correct server. I also had to change the connection string in my application to match the database's new location.

2. Now that my database was on a different server, the login system didn't work! This was because the default connection string for the Membership provider was no longer valid. There is however a very good video on this website that guides you through setting this up. It's the"ASP.NET How Do I? #13" video.

I hope this helps. If you think your problem is caused by the same thing then write back and maybe I can help.

|||

You will probably want to you SQL authentication because chances are, the SQL Server and the application server are on two different servers.

Who is your host?

|||

my web services provider is PROWEBS (prowebs.co.in).

|||

thanks for your reply. Yes i think my problem is same as your's, so please guide me.

My provider is (prowebs.co.in).

Tell me the steps you followed.

|||

smarty,

I've had a look at your provider's website and it appears to be exactly the same setup as my provider. You have to place your SQL Server database on a specific server for it to work - in your case, it is the "3Essentials MSSQL" server.

Unfortunately you cannot simply copy your existing database to the server (I had the same problem). A new empty database must be created on the 3Essentials server. Then, there are two things you can do.

If your database is still quite small and simple, you could recreate the tables yourself by connecting to your new database through MS Visual Studio. This is what I did.

If your database already has a lot of data in it and would take too long to recreate, you can transfer the data from your old database to your new database. This requires making a backup of your database using MS SQL Enterprise Manager (supposedly free to download from Microsoft, although when I tried, the download wasn't there) and then sending this backup to your provider so they can upload it for you. Detailed instructions can be found in your provider's FAQ.

smarty - are you using MS Visual Studio? If so, and you would like to try the first option, let me know and perhaps I could walk you through it. Send me a private message.

Patrick

|||

Patrick,

thnx for ur prompt reply..........

yes i m using MS Visual Studio and m also interested in using the first option............So, plz guide me through...........

|||

Ok,

1. Login to your user account at Prowebs. Find the database management section, and create a new MS SQL 2005 database. You'll give it a name, and a username and password.

2. Find out the server address for your new database. I guess it will be something like sql.3essentials.com. Also try and find out the connection string - my hosting company has a neat tool that tells you what it is. If yours doesn't, don't worry - you can find out in Visual Studio later.

3. Open up Visual Studio 2005. Click on the View menu and choose Server Explorer. Click on 'Connect to Database'.

4. In the new window, select the following options:

Datasource: Microsoft SQL Server

|||

i didn't get the server name. i put my dbi.3Essentials.com as server name but it still showing the same error which i have already given u.

|||

smarty,

Did you go through all the steps that I gave you? If not, how far did you get?