Showing posts with label finally. Show all posts
Showing posts with label finally. Show all posts

Monday, March 19, 2012

LocalSqlServer

I finally got my website to run on the local machine. I thought it was going to run on the server but I just get my login. After I enter my info and click "login" I get the following error. Do I need to enable the SQL Server Browser service?

Server Error in '/' Application.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.

Source Error:

Line 138: <providers>Line 139: <add name="AspNetSqlMembershipProvider"Line 140: type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"Line 141: connectionStringName="LocalSqlServer"Line 142: enablePasswordRetrieval="false"


Source File:C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\machine.config Line:140

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Perhaps, but that isn't what is causing the error. You haven't configured a connection string with the name "LocalSqLServer".

|||

Do I do this in the solutions web config file?

|||

Yes

|||

Here is my web.config so far. I've tried putting the add tag and assigning LocalSqlServer to the default provider but I can't get anything to work. So what exactly do I need to do and where?

Thanks,

Nick

<?xmlversion="1.0"?>

<configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<connectionStrings>

<addname="ConnectionString"connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\OpenAssess.mdb;Persist Security Info=True"providerName="System.Data.OleDb"/>

</connectionStrings>

<system.web>

<traceenabled="true"requestLimit="15" />

<authenticationmode="Forms"/>

<roleManagerenabled="true"/>

<compilationdebug="true"/>

</system.web>

</configuration>

|||

Can I make this connectin straight to Access with out using sql at all? Our host server doesn't support SQL Server.

Thanks,

Nick

|||

Looks like you are using the built-in Login controls. they use SQL Server 2005 Express by default, not access.

SQL Server 2005 Express is a free download from the same place as VWD EXpress, why not just use it?

|||

Where is your aspnetdb going to be?

|||

ASPNETDB.MDF is in my App_Data folder. I was trying to avoid SQL Server because the server we are on does not support it and I am trying to input data from the website to a database. Do you recommend we buy a package that supports it? I have SQL Server Management Studio Express on my local machine.

Thanks,

Nick

|||

These are things wrong so far:

Your web.config file does not turn membership on.

Your web.config file does not have a membership provider defined (Which is fine if you want to use the default one).

You do not have a connection string that the default membership provider is configured to use (LocalSqlServer) defined in the connection strings section.

Apparently your host doesn't support Sql Server, yet you are trying to use a .MDB file (That's a Sql Server file). Perhaps you meant that your host only supports Sql Server Express (BTW, that's backwards from most hosting services -- Most support Sql Server but not Sql Server Express).

Wednesday, March 7, 2012

Local or Remote?

Hi all - beginner here :)

Have not used Reporting Services before - used to use crystal report.

I have finally got a report working using the following code:

//ReportViewer1.Visible is set to false in design mode ReportViewer1.Visible =true;// Set the processing mode for the ReportViewer to Local ReportViewer1.ProcessingMode = ProcessingMode.Local; LocalReport rep = ReportViewer1.LocalReport; rep.ReportPath ="reports/Despatch.rdlc"; despatch desp2 =new despatch(); DataSet dtable2 = desp2.DespatchNotesByOrderID("52"); DataSet ds = dtable2;// Create a report data source for the sales order data ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DespatchByID_despatchbyid", dtable2.Tables[0])); rep.Refresh();

This works perfectly :) However - I have just discovered that I cannot make use of the "print" button on the reportviewer when it is a local report. Can anyone tell me how I would go about using server reports for the same purpose?

Thanks in advance.

Stephen.

Hi - having looked around - I figure that I need to deploy my designed reports to my reporting server - I'm running Visual Studio 2005 Standard and SQL Server Express with Advanced Services. Any help greatly received :)

|||

This is easy this is a great article which go with u step by step

http://msdn2.microsoft.com/en-us/library/ms251712(VS.80).aspx