Like it

Sunday, July 17, 2011

How to Display Line Numbers in Visual Studio

Show Line Numbers in Visual Studio

It is always better to have Line numbers displayed in Visual Studio when you debug your VB or C# Project. It is not turned on by default. you can turn it on as shown below



Login and Registration Tips and Tricks

Although this is not specific to porting, this link provides tips and best practices for creating
user management pages for your sites. Since this blog is about asp.net I thought you might find it useful.

http://www.getelastic.com/registration-usability-tips-ecommerce/


Free .Net ebooks Download

This post aims to give you free asp.net, vb.net, c#.net ebooks and tutorials. This free ebooks teaches you visual studio.Net, visual basic.Net, ActiveX, Vbscript, ASP.NET, VB.NET, C#.NET, J#, Crystal Report.NET, ADO.NET, Visual Basic, Visual C++, Visual J++, microsoft .net platforms, c net, asp net 2.0, microsoft visual interdev, visual basic 2005 and vb.net database, etc.
This site free .Net ebooks guides to learn .Net tips, programming introductions, scripting, asp.net with vb.net and c#.net, secure asp.net web applications, visual studio, etc.
The following are the free Dot NET and visual studio ebooks and tutorials provided by this site.
  1. 65 Tips for Migrating to Visual Studio .NET
  2. A Programmer's Introduction to Visual Basic.NET By Craig Utley and Jonathan Morrison
  3. ActiveX and VBScript
  4. ActiveX Programming Unleashed by Weiying Chen
  5. An Introduction to ASP .NET using Visual Basic .NET By Peter McMahon
  6. An Introduction to ASP.NET
  7. ASP.NET AJAX Roadmap
  8. ASP.NET Web Developer's Guide By Mesbah Ahmed, Chris Garrett, Jeremy Faircloth, and Chris Payne
  9. ASP.Net with C# - The Basis By Vijay Mukhi
  10. Beginning VB.NET, 2nd edition
  11. Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication By J.D. Meier, Alex Mackman, Michael Dunner, and Srinath Vasireddy
  12. CodeNotes for .NET Edited by Gregory Brill
  13. CodeNotes for J# Edited By Gregory Brill
  14. COM and .NET Interoperability By Andrew Troelsen
  15. Dan Appleman's Developing ActiveX Components with Visual Basic 5.0
  16. Database Developer's Guide with Visual Basic 4, Second Edition By Roger Jennings
  17. Database Developer's Guide with Visual C++ 4, Second Edition By Roger Jennings & Peter Hipson
  18. Improving .NET Application Performance and Scalability By J.D. Meier, Srinath Vasireddy, Ashish Babbar, and Alex Mackman
  19. Inside ASP.NET Web Matrix By Alex Homer and Dave Sussman
  20. Introducing Microsoft Visual Basic 2005 for Developers
  21. Late Night ActiveX By Eric Tall and Mark Ginsburg
  22. Learning Crystal Reports for DotNet By Brian Bischof
  23. Mastering™ Visual Basic® .NET By Evangelos Petroutsos
  24. MetaData Tables by Vijay Mukhi , Akash Saraf and Sonal Mukhi
  25. Moving to ASP.NET: Web Development with VB .NET By Steve Harris and Rob Macdonald
  26. Programming the .NET Compact Framework in Visual Basic .NET by Paul Yao & David Durant
  27. Programming VB.NET - A Guide For Experienced Programmers By Gary Cornell
  28. Proxy in VB
  29. Sams Teach Yourself Visual Basic 6 in 24 Hours By Greg M. Perry
  30. Special Edition Using Microsoft Visual InterDev
  31. Special Edition Using Microsoft® Visual Studio for Enterprise Development
  32. Teach Yourself ActiveX in 21 Days By Sanders Kaufman, Jeff Perkins and Dina Fleet
  33. Teach Yourself VBScript in 21 Days by Keith Brophy, Timothy Koets
  34. Teach Yourself Visual J++ in 21 Days by Laura Lemay, David Olhasso, Charles Perkins, and Patrick Winters
  35. Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET
  36. VBScript UNLEASHED By Petroutsos, Schongar, et al.
  37. Visual Basic .NET For Object-Oriented Programmers
  38. Visual Basic 6 Black Book By Steven Holzner
  39. WebSphere and .Net Interoperability Using Web Services
  40. WebSphere MQ Solutions in a Microsoft .NET Environment
  41. XML Web Services and Soap By Vijay Mukhi, Vikram Ramchand and Sonal Mukhi

Session keeps timing out when debugging iis7

I found out why this is happening. In IIS7 on the Application Pool, there are ping settings that will kill a session if it gets not response. This is great for production as it keeps iis running slim but when debugging in Visual Studio and stopping on a breakpoint that is nasty.

I found an article that explains how to disable the ping or extend the timeout period.

Application Pool Ping setting in IIS
http://technet.microsoft.com/en-us/library/cc725836.aspx

If you come across any tips, tricks or resource you think the group will find helpful please email them to Muhammad Nadir at nadir.fsd@gmail.com we will post them here.

Required permissions cannot be acquired

If you get the following error message then this link provides you with the step by step to resolve it

http://marcoscavaleiro.blogspot.com/2006/11/failed-to-grant-minimum-permission.html

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.Security.Policy.PolicyException: Required permissions
cannot be acquired. Source Error: An unhandled exception was generated during
the execution of the current web request. Information regarding the origin and
location of the exception can be identified using the exception stack trace
below. Stack Trace: [PolicyException: Required permissions cannot be
acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet
reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet&
denied, Boolean checkExecutionPermission) +2770052
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet
reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet&
denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission) +57
[FileLoadException: Could not load file or
assembly
'Microsoft.Practices.EnterpriseLibrary.Data.Configuration.Design,
Version=3.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. Failed to grant minimum permission requests. (Exception from
HRESULT: 0x80131417)] System.Reflection.Assembly._nLoad(AssemblyName
fileName,
String codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection) +0

If you have any tips, tricks or resources that you think would assist the group please email them to Muhammad Nadir at nadir.fsd@gmail.com
and we will post them here.

Do NOT use Response.Close unless you really need to

I found out the hard way with a bug I was getting. A JSON call was truncating on me and it turns out a Response.Close was intermittantly removing the last character.
Here is the article: http://forums.iis.net/t/1152058.aspx
If you have any tips, tricks or resources that you think would assist the group please email them to Muhammad Nadir at nadir.fsd@gmail.com
and we will post them here.

30 Simple Steps to Creating Sandbox Test Accounts.

I struggled all day trying to use the sandbox for PayPal then I found this forum article.
I found it so helpful that I have posted it here so others could benefit from it. If you come across articles, tips, tricks let me know and I will post them as well. You can email them to me at nadir.fsd@gmail.com

-----------------------------------------------------------------------------------------------
http://www.paypaldeveloper.com/pdn/board/message?board.id=sandbox&message.id=6035#M6035

After 6 hours of pain with PayPal support (or lack thereof) I present the following 30 step process to creating, confirming, and verifying test accounts through the broken Developer Central Sandbox.

I hope this helps other people, and that the years of life I've lost over the last several hours is worth it.

To Setup Sandbox and Get Test API Credentials:

Prerequisites:
* Create a user account to access the Developer Central Sandbox.
* Log in to the Sandbox account
* Create a Test Account of type 'seller'.
- This will throw an error message on saving, but it will still create the account. Click the Test Accounts tab to see the account it created.

Create Confirm the email address:
1. Create business test account (done in prerequisite above)
2. Log into PayPal Sandbox with test business account details created earlier.
3. Go to Profile Tab
4. Go to Email
5. Choose the email address and click 'Confirm'
6. Go back to the Sandbox Test Environment and click the Test Email tab
7. Open the email with subject line 'Activate Your PayPal Account'
8. From the email body, select the confirmation URL and paste into new browser window - it will load the PayPal site (in sandbox mode).
9. Log in with business account.
10. From the landing page, click the 'confirm email' link in the 'To Do List' box.
11. Click the 'click here if a link doesn't appear in the email' link.
12. Paste in the confirmation number from the email in step 8, and click confirm. A confirmation of success should be displayed.
13. Click Continue.

Create Bank Accounts For Test Business Account:
14. Click the Profile tab
15. Click Bank Accounts link
16. Create a fake bank account. Test Bank. Use BSB 242-200 for Australia. Any random integer for account number, so long as it's not already being used by another PayPal account. I ended up having to mash the keypad until I found an unused number.
17. Confirm the bank account by clicking the 'confirm' link after the step above.
18. Step 17 loads another page where you need to click 'Submit'.
19. Step 18 loads another page where you need to click 'I Agree'.
20. The account should now be verified.
21. Click the Profile Tab again.
22. Click API Setup
23. Click Request API Credentials
24. Select API Signature
25. Click I Agree, Click Submit.
26. Copy the details to a safe place for later reference.

Developer Central Sandbox
27. Go back to the Developer central sandbox and login with your account details created in the prerequisite section of this document (i.e., not your test business account, but your actual Developer Central Sandbox account).
28. The Test business account should now be verfied.
29. Click API Credentials tab.
30. The API credentials obtained in step 26 should appear.