Geeks With Blogs
Tanveer Ibn Haresh
1)To ensure debugging of  Javascript with VS2008 IDE, you have to make some changes in Internet Explorer.
In IE, Go to Tools--->Internet Options. Then in the Advanced Tab, make sure both the following check boxes are unchecked.
i) Disable script debugging (Internet Explorer)
ii) Disable script debugging (Other).

2) Enabling Json on WCF.
While enabling a WCF Operation to return data in Json format, you will  find  that , the tag WebInvoke is not resolved by default namespace references. To take advantage of WebInvoke, you have to add reference to  System.ServiceModel.Web.dll .

This is not readily available in the references section. You would have to add this from the locaiotion C:\Windows\Microsoft.NET\Framework\v4.0.30319

After adding this you may see an invalid icon on the reference. If it is , this is because your target framework for the project is set to  .NET Framework Client Profile. This does not support the above DLL.

Go to the project properties and change it to full version of (.Net Framework 4). Invalid icon will disappear from the dll reference.

In a hurry, don't forget to add  "using System.ServiceModel.Web; " on the top

3) If you are calling a WCF Rest method from Inside an MVC site, don't forget to add the following line in your javascript call

jQuery.support.cors = true;

This will enable cross-domain support.


4) Restoring Database file with different names.

To see the actual physical filenames in the backup file
RESTORE FILELISTONLY FROM DISK = 'C:\Database\PN.BAK'
GO

To do the restore 

RESTORE DATABASE EnergyMiserPN FROM DISK = 'C:\Database\PN.BAK'
WITH REPLACE,
MOVE 'EnergymiserPN' TO 'C:\Database\EnergymiserPN.mdf',
MOVE 'EnergyMiserPN_log' TO 'C:\Database\EnergymiserPN_Log.ldf'
GO




Posted on Monday, October 26, 2009 2:36 AM | Back to top


Comments on this post: General .Net Tips Part 1

# Good Tips
Requesting Gravatar...
This helped me really when I was working on my new ap.
Left by webkatalog on Feb 05, 2010 4:25 AM

# re: General Tips
Requesting Gravatar...
My little brother works a lot with Javascript, so I guess I have to send him the link, as he really needs to learn something.
Left by prepaid on Jun 20, 2010 12:59 AM

# re: General Tips
Requesting Gravatar...
would it be easier to do this in firefox?
Left by home lighting on Jun 23, 2010 1:32 PM

# re: Job opportunities
Requesting Gravatar...
Hi Tanveer,

I was keen on having a candidate with your experience as I have an opening for ASP.NET and C# skill set.

Post me your updates on my email address if you are looking further for the opportunity or if you require more information over the position.

email - chepal.p@hotmail.com

I have also invited you to my contact list on Linkedin.

Hope to talk to you soon.

Regards,

Chepal Patel
HR & Recruitment Consultant
Sydney area, Australia
(E) chepal.p@hotmail.com
(M) +61.0.425372217
Left by Chepal Patel on Mar 02, 2011 7:28 PM

Your comment:
 (will show your gravatar)


Copyright © Tanveer-Ibn-Haresh | Powered by: GeeksWithBlogs.net