Simple PayPal

Simple connection and Controls to make those PayPal payment easier 
I created this simple set of controls to make it easier to add PayPal simple buttons, all you need is a PayPal account and the buttons can point to allow you to make payment.
Please feel free to test out the BuyNow button in to my account b_avery@yahoo.com, all funds welcome.
Currently I am only adding features as and when I need them, but feel free to make comments or requests in the Discussions and Issue Tracker sections
 
Other sources worth look at are : 
Use of the PayPal payment system in ASP.NET http://www.codeproject.com/KB/aspnet/UsePayPalPaymentInASPNET/

Report Viewer

 

Having a number of SSRS reports is all well and good, but if the end users can not see the reports it is useless, therefore we need to generate a method of viewing the reports via a small application.

The Report Viewer application will be built using C# .NET 2.0, and is configurable by the Web Services supplied by Reporting Services. 

The Reporting Services Web Services is an industry standard way of accessing information via SOAP .

The Web Services supplied by Reporting Services provide an interface in the reporting engine to gain access to the reports and the report inner workings.

By interfacing to the Reporting Services Web Services we can extract the available reports that have been loaded on to the Reporting Services Server. 

We can then display a bespoke parameter screen which can capture all that is required before displaying the report.

When the Report Viewer is loaded it will communicate to the Report Server, which is configurable via the application configuration file, to retrieve a list of available reports and folders.

The reports and folders can then be displayed within the Report Viewer as a list, upon selecting a folder the Report Viewer will then go in to that folder and return a list of reports and folders. It is important to note that only visible objects will be displayed, any objects that have been set to hidden will not be displayed in the Report Viewer. This allows for ancillary objects, like images and data sources, to be hidden from the end users.

Once a report has been selected the parameters for that report are dynamically displayed by the Report Viewer, looking at the parameter list from the Report Server Web Services and generating the required requests.

Once all the parameters have been captured the Report Viewer will make a request to the Report Server via HTML to retrieve the report and pass the parameters, this will allow for the Report Viewer to display the report to the user, who can then elect to either print or export the report is they so desire. 

This code is intended to provide viewer for SQL Reporting Services that uses exclusively the SOAP API for rendering. The Viewer will be embedded as a Custom User Controls fragment into the calling form. 4

This document will help you if you are looking for more control over how you can integrate a report and its parameters into the Report Viewer application that may use different authentication methods than Reporting Services, usually if you want something more than what you already find in the ReportViewer web server control. All prompts for parameters are created dynamically and you can easily apply different formatting or even hide some of them.

Using Report Viewer

Using the Report Viewer is very simple, just supplying the, Report Server WSDL path, the location of the Report Server and if you need to the report folder. 

Setting up the application configuration file, follows the Microsoft standard for attaching to Web Services, and providing application parameters, an example of an app.config file is listed below

<add key="ReportServer" value="http://172.24.8.170/ReportServer/" />

<add key="ReportConfiguration" value="%26rc:Parameters=false" />

<add key="ReportURL" value="http://172.24.8.170/ReportServer/Pages/ReportViewer/?{0}%26rs:Command=Render" />

<add key="ReportWebReport" value="true" />

Example C# code for using and calling the Report Viewer:

 

//Instantiate the object 

EH.ReportViewer.Reports r = new EH.ReportViewer.Reports();

 

//Pass the report folder you wish to start in, if this is not supplied then the root will be used

r.ReportFolder = "/Photonet Reports Project";

//Load a single form, if you leave this out a collection of forms will be displayed

reports.ReportName = ReportName;

//Display the reports

r.DisplayReports(); 

 

Key Points

I consider the most interesting point to be the way we can rebuild parameter prompts. This opens the door for customizing these prompts, for example, set a Calendar control for a DateTime parameter, hide some report parameters, or provide values behind the scene. 

!!Known Limitations

So far the code does not perform validation. This means that if you submit a blank value for a field that does not accept blank values, the code will not show any validation message.

The Parameter form does expand depending on the number of parameters that are supplied in the report, and depending on your screen size the height may extend beyond the size of the screen.

When a parameter is based from a query it currently is not displayed, as this will be an extension to the currently functionality pf the Report Viewer, and it is currently not required for this release of code. 

Source Code can be found on CodePlex

Dynamic Data

With the release of .Net 3.5 SP1 comes ASP.NET Dynamic Data.   Dynamic Data is a great tool to generate an administration website for your data access, enabling you to get at the data in a very simple method.

Not only is the viewing of the information simple, but also the building of such website could not be any easier.

Here are a few places you might find interesting:

ASP.NET Dynamic Data Demo

Putting ASP.NET Dynamic Data into Context

Hanselminutes Podcast 109 – ASP.NET Dynamic Data with Scott Hunter 

New ASP.NET Dynamic Data Support

Increase Development by increasing the speed of Visual Studio

Like Windows Vista, you can perform a number of changes to increase the performance of Visual Studio. 

  1. First make sure you have the latests Service Pack installed.
  2. Under Options, make sure Animation environment tools.
  3. If you don’t use the Navigation bar, then turn this off.
  4. Make sure Track changes of off.  In Options, Text Editor and uncheck Track Changes.
  5. Track Active Item in Solution Explorer, remove this, it can be found in Options, Projects and Solutions.  (Don’t do this for a VB application)
  6. Disable AutoToolboxPopulate, this is found in Options, Windows Forms Designer
  7. Disable the Startup screen by selecting Show Empty Environment
  8. When loading Visual Studio, disable the splash screen “devenv.exe /nosplash”

 

 

When will .Net 3.5 sp1 be available on all machines?

 

If you are building an application for general release, and would like to build it using .Net 3.5 SP1, it would be nice to know if the end users already have .Net 3.5 SP1.

We can safely say that the majority of end users has .Net 2.0, as this is part of the Windows update process.

Currently to upgrade to .Net 3.5 SP1 you will need a separate download,which is not a small download.

Help is at hand as Microsoft will be shipping the .Net 3.5 SP1 through Windows Update, for all users that have .Net2.0 installed, and Windows update enabled, this will be available in January 2009.

This does not apply to Visual Studio 2008, as you will still require a separate download.

 

[more

What do you need to get SubVersion working in Visual Studio 2008

What do you need to get SVN to working within Visual Studio 2008?

You should only need AnkhSVN, as this is an AddIn for Visual Studio 2008.  But it is worth getting Torroise SVN to allow for access to SVN via the file manager.

If you need to run SVN on your machine to hold the safe then you’ll need SubVersion

Once you have SVN installed it is always worth adding a global ignore pattern to TortoiseSVN, he is one that Jonathan Merrifield provided me with. 

 

Put this in TortoiseSVN -> Settings -> Global ignore pattern

*.o *.lo .la ## .*.rej .rej .~ ~ .# .DS_Store thumbs.db Thumbs.db *.bak *.class *.exe *.dll *.mine *.obj *.ncb *.lib *.log *.idb *.pdb *.ilk .msi .res *.pch *.suo *.exp .~ .~ ~. cvs CVS .CVS .cvs release Release debug Debug ignore Ignore bin Bin obj Obj *.csproj.user *.user 

A nice article worth having a look at is by Alexey Smirnov, Version Control, article below

  

Version Control

Getting Started with AnkhSVN and Subversion

By Alexey Smirnov

There are a few version control solutions for ASP.NET out there on the market. One of them is a new version of AnkhSVN. AnkhSVN 2.0 is a free Subversion client, implemented as a package for Microsoft Visual Studio 2005 and 2008. It provides an interface to perform the most common revision control operations directly from inside the VS.NET IDE.

This article provides an introduction to AnkhSVN by describing how the product works and explaining its main operations.

As mentioned above, AnkhSVN is a Subversion client; in other words, an interface between Subversion, a free open-source version control system, and Visual Studio .NET. On its own, Subversion allows one to track and store code changes, collaborate, and share project files. All information about project files is saved to a repository, a simple directory structure. To create and manage a repository you would need to install Subversion or one of several other third-party client applications. For this purpose, this article used TortoiseSVN, a standalone Subversion client.

There are many good reasons for AnkhSVN and TortoiseSVN cooperation. While TortoiseSVN has all the necessary commands to work with Subversion and can be used as a standalone version control tool, AnkhSVN focuses on automating common tasks for Visual Studio developers and integrating to the IDE. Used together, both tools can provide everything needed to make the development process quick and easy.

The most recent versions of AnkhSVN and TortoiseSVN can be found on their official Web sites: http://www.ankhsvn.com and http://www.tortoisesvn.net.

Once AnkhSVN and TortoiseSVN have been downloaded and installed, it is required to create the initial repository. To accomplish this, first create a new folder. TortoiseSVN extends Windows Explorer and all commands are available from its context menu. Right-click on the new folder and access the TortoiseSVN menu. Select the Create Repository Here option. 

Start Visual Studio and make sure AnkhSVN is the active source control provider. Open Tools | Options | Source Control and check that AnkhSVN is already selected.

Open a project in VS.NET. From File Menu | Subversion | Add add the solution to Subversion. In the Add to Subversion dialog box add the Repository URL created in the previous step. For a directory located at D:\SvnRepos the URL will be file:///D:/SvnRepos/.

After that you’ll see in Solution Explorer a blue plus sign (+) next to each file. This means your files are ready to work with Subversion. To add files in the repository, open the context menu in Solution Explorer and click Add, then click Commit. You’ll see green checkmarks alongside items in Solution Explorer. Now your project is under version control and the initial version of the project is saved in the repository.

AnkhSVN adds to Visual Studio a new Pending Changes window to show all changes in a single location rather than having to navigate through Windows Explorer or even Solution Explorer. Once you start to make changes, you’ll see modified items added to the Pending Changes window. This window is accessible through View | Show Pending Changes.

If a project has been modified and new revisions were added in a repository, you can restore the revisions by using Update and View History in the context menu of Solution Explorer. To restore the previous version, go to Update | Revision | Previous. To get back to the specific revision, open View History and find the number of the revision you want to get back. Then open Update and specify the number to get the right revision.

Update and View History can be applied concurrently to multiple files. To restore a single file you may use Revert to get the revision menu from Solution Explorer.

You’ll get a more advanced interface to work with the repository in TortoiseSVN. Go to Windows Explorer. In the context menu find TortoiseSVN | Update to revision, where you can choose which revision has to be restored in the project directory.

One of the features of a version control system is the ability to isolate changes onto a separate line of development. This line is known as a branch. Branches are often used to try new features without disturbing the main line of development with compiler errors and bugs. As soon as the new feature is stable enough, the development branch is merged back in to the main branch (trunk). Another feature of a version control system is the ability to mark particular revisions (e.g., a release version) so at any time you can recreate a certain build or environment. This process is known as tagging.

Subversion combines these two processes into one. Create Branch/Tags is available in TortoiseSVN through the context menu Branch/Tags. Specify the URL for the new branch; for example, “project_url/1.0” where “1.0” will be the name of the branch. Use the Switch working copy to new branch/tag checkbox if you want your working copy to be switched to the newly created branch.

After that you can work on the project as usual and when you need to return the whole project back to version 1.0, use the Update to revision command.

Conclusion

The new release of AnkhSVN is fast and stable compared to the earlier versions — and a good alternative to other source control solutions for ASP.NET developers. This article covered typically used commands of AnkhSVN and explained main steps to start working with AnkhSVN and Subversion. More information about Subversion and other third-party clients can be found at http://subversion.tigris.org.

Alexey Smirnov is an IT consultant and a Microsoft MVP. You can reach him at mailto:alexey.smirnov@gmail.com.

Code Style Enforcer

 

Make sure your code is styled correctly 

Code Style Enforcer is a DXCore plug-in for Visual Studio 2005 / 2008 that checks the code against a configurable code standard and best practices. It is developed for C#, but some of the rules will also work for VB .NET, though not tested. The code standard is currently configurable with the following rules…[more]

Of course you are going to need standards to work to, The IDesign C# Coding Standard, for development guidelines and best practices.

Client Application Services in VS2008

Just ran in to an issue of security when having many web applications.  I needed all the web application to use the same security access, after a little research I found that Client Application Services in VS2008 works a treat, as it has been written to handle security in the cloud.

I found a few good articles on the subject

Client Application Services with Visual Studio 2008

Implementing Application Security with Client Application Services in VS2008 

Best of all I just love how it handles if your remote server is off line or not available

ConnectivityStatus.IsOffline = true; 

To get this working in your web application you will need to make a few changes to the Web.Config, and then point the serviceUri to your service

 

<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <section name="testing_Security.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>

<appSettings>
   <add key="ClientSettingsProvider.ServiceUri" value="http://localhost:55666/AppServices/Profile_JSON_AppService.axd" />
</appSettings>

 

<membership defaultProvider="ClientAuthenticationMembershipProvider">
      <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="http://localhost:55666/AppServices/Authentication_JSON_AppService.axd" />
      </providers>
</membership>

<roleManager defaultProvider="ClientRoleProvider" enabled="true">
      <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="http://localhost:55666/AppServices/Role_JSON_AppService.axd" cacheTimeout="86400" />
      </providers>
    </roleManager> 

Web.config (8.75 kb)