Monday, April 25, 2011

visual studio crashes when adding connection to online database from server explorer.

visual studio crashes when adding connection to online database from server explorer.
I encountered this problem recently and i found that the reason was that my computer c drive has less space(less than 150 mb). i deleted few files from c drive then it was working fine.

Saturday, April 23, 2011

silverlight exception

when i was trying to get the data from a webservice in my silverlight project i got the following exception. It was working few minutes back but when i restarted my visual studio project i got the exception.
An error occurred while trying to make a request to URI 'http://localhost:1285/WebServices/LoginService.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

solution: I tried adding the clientaccesspolicy.xml file which is used to access webservice if it is hosted on some other server. but still the same problem. then  I noticed that the random port VS2010 was using earlier had changed from what it was using now(as i restarted my visual studio).  I looked at my service references and it was using the old port number in the service definitions.  I updated the new visual studio port number or you can also delete the service references and then recreate them and everything will work fine - I then checked the web.config and service refs and they now have the new port number.

Friday, April 22, 2011

Time management

http://richgrad.com/powerful-time-management-strategies-by-randy-pausch/This link has a very good video on Time Management.

Click Here to watch the time management video.

Saturday, April 9, 2011

mysql error: 150

MySQL error no: 150.

I got this error when the primary key column was not unsigned but foreign key column was checked signed. so make sure that both primarykey column in parent table and foreign key column in child table both datatype, range match properly.

set startup page in silverlight

Q. How do I set the Startup page in silverlight?
A: you have to assign one of your .xaml page to the RootVisual element in the App.xaml.cs file in the Application_Startup event as below.
 private void Application_Startup(object sender, StartupEventArgs e)this.RootVisual = new Details();

{

}

whichever xaml page you want to display to the user that page object has to be created and assigned here.

Monday, April 4, 2011

connect to mysql from silverlight

In order to use mysql database with silverlight so that you can use entity framework. you need to install mysql connector for.net which is an msi file. Then restart the visual studio then from the server explorer you can connect to mysql database.

Below is the link to download mysql connector for .net

http://dev.mysql.com/downloads/connector/net/

first download button is to download source code and examples.
second download button is to download .msi file to install the mysql connector for .net