Re: [OzSilverlight] Linq to sql

2008-08-27 Thread Stephen Price
Solved the problems. It was a threefold combination of the connection string issue being discussed before (now fixed), the absence of the clientaccesspolicy.xml in the root of the web site (damn, I've hit that before I should have remembered!) and the incorrect webservice url in the endpoint for th

Re: [OzSilverlight] Linq to sql

2008-08-27 Thread Stephen Price
Good idea, I can see the merits in doing that. Back to my issue, it seems now that it's related to the url of the endpoint of the WCF service. I read a post yesterday about this so will try find it again. changing the endpoint from localhost:portnumber/service.svc to localhost/service.svc made it

Re: [OzSilverlight] Silverlight WCF web service

2008-08-27 Thread Stephen Price
Oh right, so you're NOT a god after all? ;) Have just down-graded your status to minor deity. On Thu, Aug 28, 2008 at 6:39 AM, Jordan Knight <[EMAIL PROTECTED]>wrote: > Hi Stephen, > > > > As soon as I saw that link you posted I remembered that I had the same > issue a while back! > > > > Sorry

Re: [OzSilverlight] Linq to sql

2008-08-27 Thread Stephen Price
So which string does it use if you set it to "use application config" AND you set a config setting in the dbml designer? I was thinking it uses web.config in preference. Anyway, i've gone down the route of setting the connection string in the constructor of the DataContext partial class, although

Re: [OzSilverlight] Linq to sql

2008-08-27 Thread .net noobie
so basically you have the two modes... Mode="ConnectionString", to use the connection string in your .dbml file or Mode="WebSettings", it's going to load from the web.config On 8/28/08, .net noobie <[EMAIL PROTECTED]> wrote: > > if you navigate to the folder in windows explorer where the

RE: [OzSilverlight] Linq to sql

2008-08-27 Thread Jordan Knight
Ah yep, good point :) Regards, Jordan Knight Readify - Senior Developer Suite 206 Nolan Tower | 29 Rakaia Way | Docklands | VIC 3008 | Australia M: +61 403 532 404 | E: [EMAIL PROTECTED] | W: www.readify.net From: [EMAIL PROTECTED] [mailto:[EMAI

Re: [OzSilverlight] Linq to sql

2008-08-27 Thread .net noobie
if you navigate to the folder in windows explorer where the .dbml file is then open the .dbml file in not pad you will see it is a xml file... it has things set in there that tell it where to find and which connection string to use On 8/28/08, Stephen Price <[EMAIL PROTECTED]> wrote: > > Have

RE: [OzSilverlight] Linq to sql

2008-08-27 Thread Steven Nagy
Except you just have to set the connection string to your dev database anyway when you go to change the LINQ designer (ie add more tables, refresh the schema, etc). Might as well just leave it in there and instead pass the correct connection string to the constructor of your Data context. S

RE: [OzSilverlight] Linq to sql

2008-08-27 Thread Steven Nagy
Yes its called tight coupling and its a code smell! J I find it better to always write the code for your DataContext by passing a connection string, rather than using the parameterless constructor. A quick FIND in the ENTIRE SOLUTION should help you nail down all cases where the data context i

Re: [OzSilverlight] Linq to sql

2008-08-27 Thread Stephen Price
Have the Serialization Mode set correctly, I knew about that one. I didn't realise you could remove the connection string from there. That would possibly help make things clearer. If I know there's only one connection string it can use then I'll feel happier it's using it. Will give that a try...

Re: [OzSilverlight] Linq to sql

2008-08-27 Thread Stephen Price
I had established eventually that it was a case of an incorrect connection string being used. I didn't know where it was getting the string from. I had the connection string in the web.config but did not realise I had a number of different strings in the Linq to sql assembly. I've found those (in t

Re: [OzSilverlight] Linq to sql

2008-08-27 Thread .net noobie
you can also just set it in the properties dialog for the .dbml and also note (just in case you did not already know) that you should set the "*Serialization Mode*" = *"Unidirectional*" if you want to send data from the LinqToSql .dbml via a WCF service to a Silverlight Application i attached a

RE: [OzSilverlight] Linq to sql

2008-08-27 Thread Jordan Knight
Yep, but by implementing the pattern below you can ensure the default constructor always uses the correct connection string - it's a preferential thing, but I like to encapsulate connection configuration in my data classes rather than pass connection strings through from my business code:) Regar

RE: [OzSilverlight] Linq to sql

2008-08-27 Thread Steven Nagy
>> This way you can explicitly control your connection string Or you can just set the connection string to the right one when you instantiate your data context??? var db = new MainDataDataContext (SomeHelperClass.DefaultConnectionString); From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

RE: [OzSilverlight] Silverlight WCF web service

2008-08-27 Thread Jordan Knight
Hi Stephen, As soon as I saw that link you posted I remembered that I had the same issue a while back! Sorry I didn't remember sooner :) Regards, Jordan Knight Readify - Senior Developer Suite 206 Nolan Tower | 29 Rakaia Way | Docklands | VIC 3008 | Australia M: +61 403 532 404 | E: [EMAIL PROTE

RE: [OzSilverlight] Linq to sql

2008-08-27 Thread Jordan Knight
Hi Stephen, You are having a tricky few days :) Sometimes LINQ to SQL config issues can arise when you have your LINQ classes in another assembly... If this is the case you may be able to get around it by following these steps: * In you LINQ to SQL designer (on the dbml file) - go to

RE: [OzSilverlight] [OT] Mail List Delays...

2008-08-27 Thread Perry Stathopoulos
Yup I notice the same thing. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of .net noobie Sent: Wednesday, August 27, 2008 9:14 AM To: listserver@ozsilverlight.com Subject: [OzSilverlight] [OT] Mail List Delays... I seem to be getting post to the list out of order... and also

Re: [OzSilverlight] Linq to sql

2008-08-27 Thread .net noobie
does the webhost have the right version of .NET to run linq...? also on a webhost account the database is properly not on the same machine as the webserver... so the localhost/127.0.0.1 properly will not work... have you looked in your documentation for the account, they should tell you there wha

Re: [OzSilverlight] Silverlight WCF web service

2008-08-27 Thread Stephen Price
Okay I finally found the answer to not being able to browse to my WCF web service. http://iweb.adefwebserver.com/Project/Blog/tabid/57/EntryID/34/Default.aspx I had to reinstall (Install?) WCF services. Something I've done in the last month essentially messed up my WCF services and IIS no lon

[OzSilverlight] Linq to sql

2008-08-27 Thread Stephen Price
Hey all, I was having a problem with my WCF web service talking to the database. I'm using Linq to SQL, and discovered that it stores the connection strings in settings in the project. If the string in the web.config is not found then it falls back to the connection string in the dll. (from settin

[OzSilverlight] [OT] Mail List Delays...

2008-08-27 Thread .net noobie
I seem to be getting post to the list out of order... and also it can be a very long delay before I see mt own posts apear on the list... are other people having the same issues..? -- .net noobie™ This Framework is not Big Enough for the both of us... ---

Re: [OzSilverlight] Silverlgiht,WCF,ClassLibrary

2008-08-27 Thread .net noobie
can you load the service in the web broswer... the msg says is an internal server error On 8/27/08, Muhammad Niaz <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > We are having some problem during adding Service References, please see the > steps that we have performed. > > > > · I have a WC

RE: [OzSilverlight] Silverlgiht,WCF,ClassLibrary

2008-08-27 Thread Muhammad Niaz
Hi Andy, Its really working, the basic problem was that I were compiled but when I see as you ask, there were error a kind of this. Service The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExcep

RE: [OzSilverlight] Silverlgiht,WCF,ClassLibrary

2008-08-27 Thread Andy Beaulieu
If you right-click the POVTcWCF.svc file inside your web project and select "View in Browser" - are you able to browse the web service without errors? This looks like a server-side problem with the web service, not anything in the Silverlight Add Reference. _ Andy Beaulieu Software

[OzSilverlight] Silverlgiht,WCF,ClassLibrary

2008-08-27 Thread Muhammad Niaz
Hi All, We are having some problem during adding Service References, please see the steps that we have performed. * I have a WCF Service Layer which contain an external ClassLibrary which is build in .NET 3.5. * I have decorated class with [Serializable] or [DataContract]

RE: [OzSilverlight] Silverlight WCF web service

2008-08-27 Thread Jonathan Parker
Try this: class CustomHostFactory : ServiceHostFactory { protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { CustomHost customServiceHost = new CustomHost(serviceType, baseAddresses[1]); return customServiceHost;