Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 20th, 2011, 03:34 AM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help me.. prob with desginer.cs

Hello

First of all i must say that the book is g-r-e-a-t !!!

i built site that very similar to the final project of PlanetWrox from the book. on my localhost the site works great ! but i uploaded the site to GoDaddy, i made the sql file and uploaded it at GoDaddy on the query analyzer.

i have problem at this page:

http://grafiko.co.il/index2.aspx

( Server Error in '/' Application.


Line 41: #endregion
Line 42:
Line 43: public GrafikoDataContext() :
Line 44: base(global::System.Configuration.ConfigurationMan ager.ConnectionStrings["GrafikoDataContextConnectionString1"].ConnectionString, mappingSource)
Line 45: {


Source File: d(....)\App_Code\Grafiko.designer.cs Line: 43

again, at my localhost that works great.

that how start my desginer.cs file:::::
--------------------------------

#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;



[global::System.Data.Linq.Mapping.DatabaseAttribute (Name="Grafiko")]
public partial class GrafikoDataContext: System.Data.Linq.DataContext

----------------------------

i really don't know what to do... i need to do somthing with the .dbml at godaddy?

i uploaded the app_code directory and i gave the premmisions to modify.

mmmm i don't know what to do, help me. thanks :)

Last edited by Oshrib; March 20th, 2011 at 04:12 AM..
 
Old March 20th, 2011, 07:54 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Does your web.config contain a connection string called GrafikoDataContextDataContextConnectionString1 that points to the database you're using for your Linq to Sql classes?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 20th, 2011, 09:37 AM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi !
thanks for you reply.

that's my web.config connection stirng:


- <connectionStrings>
<clear />
<add name="GrafikoConnectionString1" connectionString="Data Source=whsql-v04.(******).net;Initial Catalog=grafiko;User Id=******; Password=*******;" providerName="System.Data.SqlClient" />
</connectionStrings>
 
Old March 20th, 2011, 09:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

But not one called GrafikoDataContextDataContextConnectionString1 , right? That's what the error message seems to suggest.....
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 20th, 2011, 09:50 AM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
But not one called GrafikoDataContextDataContextConnectionString1 , right? That's what the error message seems to suggest.....
so i need to write the string like that? :

<add name="GrafikoDataContextDataContextConnectionStrin g1" connectionString="Data Source=whsql-v04.(******).net;Initial Catalog=grafiko;User Id=******; Password=*******;" providerName="System.Data.SqlClient" />
 
Old March 20th, 2011, 09:54 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, try that and see if it helps....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 20th, 2011, 09:54 AM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Oshrib View Post
so i need to write the string like that? :

<add name="GrafikoDataContextDataContextConnectionStrin g1" connectionString="Data Source=whsql-v04.(******).net;Initial Catalog=grafiko;User Id=******; Password=*******;" providerName="System.Data.SqlClient" />
i have changed that, and now i have a new error:

Invalid keyword, contain one or more of 'no characters', 'control characters', 'leading or trailing whitespace' or 'leading semicolons'.
Parameter name: data
source

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.ArgumentException: Invalid keyword, contain one or more of 'no characters', 'control characters', 'leading or trailing whitespace' or 'leading semicolons'.
Parameter name: data
source

Source Error:


Line 41: #endregion
Line 42:
Line 43: public GrafikoDataContext() :
Line 44: base(global::System.Configuration.ConfigurationMan ager.ConnectionStrings["GrafikoDataContextConnectionString1"].ConnectionString, mappingSource)
Line 45: {

Source File: d:\hosting\7540143\html\App_Code\Grafiko.designer. cs Line: 43
 
Old March 20th, 2011, 09:58 AM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar, that's possible that LINQ is not an options at GODaddy ?

againg, i don't know how to upload the .dbml file, if that's ok to upload only the app_code dir so i made that. but if i need to do schema or somthing like that, that's a problem.
 
Old March 20th, 2011, 10:09 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
Exception Details: System.ArgumentException: Invalid keyword, contain one or more of 'no characters', 'control characters', 'leading or trailing whitespace' or 'leading semicolons'.
This seems to suggest you have invalid data in your connection string such as line breaks.

Quote:
Imar, that's possible that LINQ is not an options at GODaddy ?
I don't know; you'll need to ask them.

Quote:
againg, i don't know how to upload the .dbml file, if that's ok to upload only the app_code dir so i made that
Yes, you should be able to upload your site as-is including stuff in the App_Code folder.

Quote:
but if i need to do schema or somthing like that, that's a problem.
L2S doesn't create the database for you, so you somehow need to create your database first at the target server. Chapter 18 shows you how to do this, but for specific details you need to talk to GoDaddy....

CHope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 20th, 2011, 11:46 AM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar !!!

that's work !! :)

i have played with the connection string, and i found at the database manager of GoDaddy button "configuration" ... and there was the specific SqlConnection (.NET) string....


thank you !
if someone stack with godaddy at the database side - you can ask me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
In ENTRoleCapabilityEO.cs tedr BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 2 April 4th, 2009 11:30 AM
How to compile - First.cs gau404 BOOK: Professional C#, 2nd and 3rd Editions 1 November 14th, 2005 03:19 AM
Enums.cs allanhu BOOK: ASP.NET Website Programming Problem-Design-Solution 3 November 2nd, 2004 10:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.