Posts Tagged ‘Microsoft’

March 9th, 2008

ASP.NET MVC Preview 2 CAPTCHA using ActionFilterAttribute

My last article on ASP.NET MVC CAPTCHA was very well received by many of my readers and it even caught the eye of the DotNetKicks crowd. Now that MVC Preview 2 was released last week, many new features make encapsulating my CAPTCHA control even easier. Most notably is the ActionFilterAttribute which allows you to override the Pre and Post action events for any action the attribute is applied to.

Basically everything works the same as it did in the previous article. I just modified things for MVC Preview 2. To validate the CAPTCHA you add the attribute CaptchaValidation to the action.

[CaptchaValidation("captcha")]
public void Register(string userName, string password, string email, string question, string answer, bool captchaValid){
    // do stuff
}

You still need to register the CAPTCHA image handler.

<httpHandlers>
    <add verb="GET" path="captcha.ashx" validate="false" type="ManagedFusion.Web.Handlers.CaptchaImageHandler, ManagedFusion" />
</httpHandlers>

I added an extension to HtmlHelper that generates a text box with autocomplete=”off”.

<label for="captcha">Enter <%= Html.CaptchaImage(50, 180) %> Below</label><br />
<%= Html.CaptchaTextBox("captcha") %>

Which generates the following.

Example of CAPTCHA

You can view the source code for this on my Google Code Project, everything is available through SVN.

  1. CaptchaValidationAttribute.cs
  2. CaptchaHelper.cs
  3. CaptchaImage.cs
  4. CaptchaImageHandler.cs

Or you can download the project for you own personal use.

Tags: , , , ,

Posted in ASP.NET, C#, Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | 24 Comments »

November 19th, 2007

TF220064 - Team Foundation Server 2008 - Reporting Service Permissions

I decided to be one of those early installers that brave the RTM and hope everything has been programed correctly, so my current system doesn’t get blown away in the upgrade process. I have a small in home Team Foundation Server that I use for my home based business and personal coding. So an upgrade is pretty risky, in that I risk loosing everything. Knowing all the risks I decided to move forward and everything was going smoothly with installing Visual Studio 2008 Team Foundation Server, until I ran in to the follow problem.

—————————
Microsoft Visual Studio 2008 Team Foundation Server Setup
—————————
TF220064: An error occurred while the Setup program was querying the settings from the server that is running SQL Server Reporting Services. This error is most likely caused by your account not having the required administrative permissions on the server that is running Reporting Services. Click Next to try again. For more information about this error, see the installation logs. For more information about the installation logs, see “Troubleshooting Installation for Team Foundation” in the Team Foundation Installation Guide.
—————————
OK
—————————

The document above told me to reference this file Drive:\Documents and Settings\SetupAccount\Local Settings\Temp \dd_install_vstf_tfc_90.txt. I found the following reference at the bottom of the log file.

[11/19/07,21:01:32] TFSUI: getcurrenttfsproperties.exe: — STATUS: TfsIntegration..tbl_service_interface has at least one row in it
[11/19/07,21:01:32] TFSUI: getcurrenttfsproperties.exe: — STATUS: Found Reports.ReportsService=http://team.coderjournal.com/ReportServer/ReportService.asmx
[11/19/07,21:01:32] TFSUI: getcurrenttfsproperties.exe: — STATUS: Writing VSTF_RS_SERVER=team.coderjournal.com into C:\Documents and Settings\nick\Local Settings\Temp\SIT41264.tmp\TfsCurrConfig.ini section Config
[11/19/07,21:01:32] Setup.exe: AddGlobalCustomProperty
[11/19/07,21:01:32] TFSUI: ***ERRORLOG EVENT*** : getcurrenttfsproperties.exe: *** ERROR: Failed to call WMI on the RS server. The most likely cause is that the setup user does not have the required permissions: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED))
[11/19/07,21:01:32] Setup.exe: AddGlobalCustomProperty
[11/19/07,21:01:32] TFSUI: ***ERRORLOG EVENT*** : getcurrenttfsproperties.exe: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
[11/19/07,21:01:32] Setup.exe: AddGlobalCustomProperty
[11/19/07,21:01:32] TFSUI: ***ERRORLOG EVENT*** : getcurrenttfsproperties.exe: at System.Management.ManagementScope.InitializeGuts(Object o)
[11/19/07,21:01:32] Setup.exe: AddGlobalCustomProperty
[11/19/07,21:01:32] TFSUI: ***ERRORLOG EVENT*** : getcurrenttfsproperties.exe: at System.Management.ManagementScope.Initialize()
[11/19/07,21:01:32] Setup.exe: AddGlobalCustomProperty
[11/19/07,21:01:32] TFSUI: ***ERRORLOG EVENT*** : getcurrenttfsproperties.exe: at System.Management.ManagementScope.Connect()
[11/19/07,21:01:32] Setup.exe: AddGlobalCustomProperty
[11/19/07,21:01:32] TFSUI: ***ERRORLOG EVENT*** : getcurrenttfsproperties.exe: at GetCurrentTfsProperties.WmiHelper.FindAllInstancesOfClass(String wmiNamespace, String wmiClass)
[11/19/07,21:01:32] Setup.exe: AddGlobalCustomProperty
[11/19/07,21:01:32] TFSUI: ***ERRORLOG EVENT*** : getcurrenttfsproperties.exe: at GetCurrentTfsProperties.WmiHelper.FindSqlRsInstance(String reportServerHostname, String databaseInstanceName, String dataSourceString)
[11/19/07,21:01:32] TFSUI: getcurrenttfsproperties.exe: Process exited with exit code: 15[11/19/07,21:01:32] TFSUI: Done calling CheckExistingTfsInstallation in GetTfsPropertiesFromDt
[11/19/07,21:01:32] vs70uimgr: Entering DisplayMessage() method.
[11/19/07,21:01:32] vs70uimgr: DisplayMessage_START:TF220064: An error occurred while the Setup program was querying the settings from the server that is running SQL Server Reporting Services. This error is most likely caused by your account not having the required administrative permissions on the server that is running Reporting Services. Click Next to try again. For more information about this error, see the installation logs. For more information about the installation logs, see “Troubleshooting Installation for Team Foundation” in the Team Foundation Installation Guide.
[11/19/07,21:01:33] vs70uimgr: DisplayMessage_END:TF220064: An error occurred while the Setup program was querying the settings from the server that is running SQL Server Reporting Services. This error is most likely caused by your account not having the required administrative permissions on the server that is running Reporting Services. Click Next to try again. For more information about this error, see the installation logs. For more information about the installation logs, see “Troubleshooting Installation for Team Foundation” in the Team Foundation Installation Guide.

From what I could tell the problem was in the database TfsIntegration..tbl_service_interface and had something to do with the follow record.

3 ReportsService http://team.coderjournal.com/ReportServer/ReportService.asmx

So on a hunch I just changed the above to. (TEAM-SERVER is the name of my server)

3 ReportsService http://TEAM-SERVER/ReportServer/ReportService.asmx

Then I continued with the installation and everything proceeded as Microsoft envisioned.

Tags: , , , ,

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | 5 Comments »

November 19th, 2007

Visual Studio 2008 and .NET 3.5 Released

Scott Guthrie has announced that Visual Studio 2008 and .NET 3.5 are now available for download and provides a tour of some of the new features.

  • If you are a MSDN subscriber, you can download your copy from the MSDN subscription site (note: some of the builds are just finishing being uploaded now - so check back later during the day if you don’t see it yet).
  • If you are a non-MSDN subscriber, you can download a 90-day free trial edition of Visual Studio 2008 Team Suite here. A 90-day trial edition of Visual Studio 2008 Professional (which will be a slightly smaller download) will be available next week. A 90-day free trial edition of Team Foundation Server can also be downloaded here.
  • If you want to use the free Visual Studio 2008 Express editions (which are much smaller and totally free), you can download them here.
  • If you want to just install the .NET Framework 3.5 runtime, you can download it here.

Tags: , , , , , ,

Posted in ASP.NET, C#, Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

September 14th, 2007

I have been a bad Blogger

Hi loyal readers,

I have to apologize, I have been a really bad blogger lately. I have neglected my blog because of a new job and a brand new Web 2.0 site that I am about to release. At the end of the month I will make an announcement about this project and all the new technologies that many of you have probably heard of but few have implemented. But until then please keep visiting and I really enjoy your comments on the following popular postings:

Thanks,
Nick

Tags: , , ,

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

July 30th, 2007

Vista Performance and Reliability Pack Unofficial Release

Please note: These fixes break all current methods of bypassing driver singing requirements except the good old F8 during boot (that you have to do every single time you start vista)

If you are using Rivatuner, atitool and or Peerguardian on 64bit vista, you will have to use F8 every single time to disable driver signing requirements to use those two programs. x86 version is unaffected.

These updates should go official on the next patch Tuesday (in one weeks time). Please read more for the download links and information on these updates.

938979 Vista Performance and Reliability Pack

This update resolves a number of individual issues which may be affecting some computers running Windows Vista. These issues have been reported by customers using the Error Reporting service, product support, or other means. Installing this update will improve the performance and responsiveness for some scenarios and improves reliability of Windows Vista in a variety of scenarios. Some examples of the improvements contained in this update are:

  • Improves performance in resuming back to the desktop from the Photo and Windows Energy screensaver.
  • Resolves an issue where some secured web pages using advanced security technologies may not get displayed in Internet Explorer on Windows Vista.
  • Resolves an issue where a shared printer may not get installed if the printer is connected to a Windows XP or Windows Server 2003 system and User Access Control is disabled on the Vista client.
  • Resolves an issue where creating AVI files on Vista may get corrupted.
  • Improves the performance in calculating the ‘estimated time remaining’ when copying/moving large files.
  • Improves performance in bringing up Login Screen after resuming from Hibernate.
  • Resolves an issue where synchronization of offline files to a server can get corrupted.
  • Resolves a compatibility issue with RAW images created by Canon EOS 1D/1DS Digital SLR Camera which can lead to data loss. This only affects RAW images created by these two specific camera models.
  • Resolves an issue where a computer can lose its default Gateway address when resuming from sleep mode.
  • Improves the performance when copying or moving entire directories containing large amounts of data or files.
  • Improves the performance of Vista’s Memory Manager in specific customer scenarios and prevents some issues which may lead to memory corruption.

938194 Vista Compatibility and Reliability Pack

This update resolves a number of individual issues which may be affecting some computers running Windows Vista. These issues have been reported by customers using the Error Reporting service, product support, or other means. Installing this update will improve the reliability and hardware compatibility of Windows Vista in a variety of scenarios. Some examples of the improvements contained in this update are:

  • Improved reliability and compatibility of Vista when used with newer graphics cards in several specific scenarios and configurations.
  • Improved reliability when working with external displays on a laptop.
  • Increased compatibility with many video drivers.
  • Improved visual appearance of games with high intensity graphics.
  • Improved quality of playback for HD-DVD and Blue-Ray disks on large monitors.
  • Improved reliability for Internet Explorer when some third party toolbars are installed on Vista.
  • Improved Vista reliability in networking configuration scenarios.
  • Improved the reliability of Windows Calendar in Vista.
  • Improved reliability of systems that were upgraded from XP to Vista.
  • Increased compatibility with many printer drivers.
  • Increased reliability and performance of Vista when entering sleep and resuming from sleep.

Download: Vista Compatibility and Reliability Pack for x64 or x86 version
Source: Neowin.net

Tags: , ,

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

July 22nd, 2007

How To: Disable Driver Integrity Checks on Windows Vista x64

One of the new features of Windows Vista was the Driver integrity Checks. In the x64 version of the product it is turned on by default, and is a great idea to prevent kernel level access to only drivers that have passed the Microsoft Testing for security and performance. However this feature can be rather annoying since Microsoft hasn’t even released signed drivers for all their products. (i.e. Streets & Trips GPS Device) So I have included the following steps in order to disable the driver signing integrity checks, so that you can install unsigned drivers.

Note: You should only do this if you are experiencing driver installs getting blocked and you use this driver on a daily basis. Because there is an F8 boot option that will temporarily disable driver signing for other needs and also this is a very good feature that helps prevent spyware and other nastys from gaining access to your OS.

  1. Log in to Windows with a user name that has administrative access.
  2. Right click on Start > Accessories > Command Prompt
  3. Select Run as administrator
  4. In the command prompt type bcdedit /set nointegritychecks on
  5. Reboot.

To turn driver signing back on do the following:

  1. Follow steps 1-4 from above.
  2. In the command prompt type bcdedit /set nointegritychecks off
  3. Reboot.

So it is that easy.

Tags: ,

Posted in How To, Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 26th, 2007

SQL Server 2008 Will Have 7 New Datatypes

I haven’t even herd of a new version of SQL Server 2008, coming out, but according to this blog the new version has some very interesting and new data types that will come in useful for geography processing.

DATE - ANSI-compliant date data type
TIME - ANSI-compliant time data type with variable precision
DATETIMEOFFSET - timezone aware/preserved datetime
DATETIME2 - like DATETIME, but with variable precision and large date range

GEOMETRY - “flat earth” spatial data type
GEOGRAPHY - “round earth” spatial data type
HIERARCHYID - represents hierarchies using path enumeration model

The first four datatypes are regular SQL datatypes but the last three datatypes are exposed as .NET system UDTs.

Tags: , ,

Posted in C#, Programming, SQL | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 21st, 2007

How To: Connect To Cell Phone Internet Though Windows Vista

Since my last article I have updated the OS on my cell phone to AKU 3 for Windows Mobile 5.0. This has been a huge productivity increase, since there is no longer a need to have a modem driver, and you can browse the internet and take calls on your cell phone at the same time.

Requirements:

  1. A Windows Mobile 5.0 or 6.0 device.
  2. Active Sync 4.2 or greater for Windows XP or Windows Mobile Device Center for Windows Vista.

USB Internet Sharing:

  1. Open the Internet Sharing application under Programs.
  2. In the PC Connection drop down select USB.
  3. In the Network Connection drop down select the network connection for your cell phone provider. (i.e. Verizon Wireless)
  4. Press Connect in the bottom left.
  5. Plug your device in to your computer using a USB cable.
  6. You will then see your Status at the top change to Connected.

Bluetooth Internet Sharing:

I am going to assume that you already have your Bluetooth device paired to your computer. If you don’t know how to do this please check the manual for your specific phone.

  1. Open the Internet Sharing application under Programs.
  2. In the PC Connection drop down select Bluetooth PAN.
  3. In the Network Connection drop down select the network connection for your cell phone provider. (i.e. Verizon Wireless)
  4. Press Connect in the bottom left.
  5. Plug your device in to your computer using a USB cable.
  6. Setup a PAN (Personal Area Network) on your computer, again please search the internet or look through your manual on how to do this, because it varies from cell phone to cell phone and Windows XP and Windows Vista.
  7. You will then see your Status at the top change to Connected.

This is a great new feature that the Windows Mobile Team has included in the Windows Mobile OS. Not only can you now use your phone while you are browsing the web, but you don’t have to go through the hassle of trying to find a modem driver and then setting up a dial up connection and typing #777 and on and on and … you get the idea. I hope you find this useful, and as always please leave a comment telling me if this works or doesn’t for you.

Tags: , , , , , , ,

Posted in How To | kick it on DotNetKicks.com | Bookmark | View blog reactions | 8 Comments »

June 12th, 2007

Apple Safari Browser Welcomed To Real World With 6 Zero Day Exploits

Apple has just released a public beta of its Safari browser for Windows yesterday. And there have been already 6 zero day exploits and many, many crashes for the browser. You can read about them here here here and here. Which makes the following image from the Apple website, borrowed from aviv.raffon.net, all the more funny.

Apple Safari Security

Also Apple has the following to say under the Security tab of their website:

Security

Now you can enjoy worry-free web browsing on any computer. Apple engineers designed Safari to be secure from day one.

For starters, Safari uses robust encryption to ensure that your private information stays that way. When you browse a secure site, Safari displays a lock icon in the upper-right corner of the browser. If you want to know more about the credentials of a secure site, click the lock icon and Safari displays detailed information about the site’s security certificate.

Safari supports SSL versions 2 and 3, as well as Transport Layer Security (TLS), the next generation of Internet security. Safari uses these technologies to provide a secure, encrypted channel that protects all your information from online eavesdroppers. And Safari lets you use standards-based authentication such as Kerberos single sign-on and X.509 personal certificates, or proprietary protocols like NTLMv2 to log in to secure sites.

Safari also supports a variety of proxy protocols — services that help firewalls control what flows in and out of the network — including Automatic Proxy configuration, FTP Proxy, Web Proxy (HTTP), Secure Web Proxy (HTTPS), Streaming Proxy (RTSP), SOCKS Proxy, and Gopher Proxy.

I don’t know about you, but it’s one thing to say that you have designed your browser to be secure from day one, but it’s another to actually prove it. Apple has fallen flat on its face with this release, and I know it is only a beta, but Fire Fox and IE have both been in beta before and haven’t nearly had this many problems.

All that I have to say is when you venture out in to the Windows world Apple, where the market share is at 90% you are not protected by your small margins anymore.

Tags: , , , , , , ,

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

May 30th, 2007

Apple iTunes 7.2 Released

I am happy to announce that Apple iTunes 7.2 has been released and this is the first release since Windows Vista was released 6 months ago that worked through Apples normal install process with out any problems. I just wanted to keep everybody updated since I have talked about the problems of installing iTunes on Windows Vista x64 in the past.

If you want any more information about this release, please view Mac Rumors.

Tags: , , ,

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »