Meeting the needs of your business from a distance

Firefox Compatability...

by Mark Shiffer 3/7/2008 10:49:00 PM

Is a pain in the ass. Yes, I said it, sorry. I know a there are a growing number of people out there using Firefox. Heck, I used to be one of them back when IE sucked, but it doesn't suck anymore. For those who are in Firefox, note that I finally got around to fixing a display issue with Firefox for this blog today. It had to do with a div that I had overflow set to visible on. It worked fine in IE, but in Firefox it caused the div not to stretch with its content. By switching the overflow to hidden, the content then displayed correctly, the div stretched in both IE and Firefox.

My question is, why? Why do different browsers interpret the same code in different ways, when there are, and have been, known standards out there for how to interpret the code? I am hoping IE 8 and its standards by default mode might help the symbiosis here, but come on, we are nearly 20 years into graphical browsers at this point. It shouldn't be this difficult to find these minute display issues.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Issues | Websites | Programming

Hard Drive Failure

by Mark Shiffer 2/4/2008 11:48:00 AM

Well, the hard drive on my main machine started throwing read failures this weekend, and then finally would no longer boot the system because of it. The sucker is only 6-months old from Western Digital. I still have IDE drives that work fine from 10+ years ago. I'm not writing off SATA, but I certainly have had more drive failures recently compared to past history and they've been SATA drives, one at full-time work and one at home. I played a bit of musical chairs with drives at home as I can't wait for the warranty replacement to get back up and running. I moved a 250GB drive that was acting as my network file store out of my server to the client PC and bought a 500GB drive from Circuit City to replace it in the server.

Really this just brought to the forefront my data protection strategies at home. I currently store any data that means anything to me on a central server at home that then gets backed up to a separate (geographical) host every night, encrypting the sensitive data. Unfortunately though, I do not mirror any of my local drives. So, the process of recovering from a failure is still a bit painful. If the drive went out on my server, I would be hurting. I wouldn't lose any data, but it would still be tremendously painful, especially because it is the PDC, SQL Server, Forefront Server and WSUS for my entire network. It has two drives, one being for the server itself and the second being the aforementioned file store for the whole network.  

I'm thinking I should mirror the drive on the server (RAID-1) and then purchase a separate NAS device to use for the central storage. It is too costly to mirror all of the client PCs in the network, but I need to shore up the server. I need to find a drive enclosure that acts as a NAS device and plugs directly into the network. That way I can take the 500GB replacement drive move it to NAS, then take the warranty drive they are sending me and use it for mirroring in the server. Wow it is fun taking care of a home network. Sometimes I wonder if it is truly worth all of the hassle.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Issues

AppDomain and Static Members

by Mark Shiffer 12/12/2007 5:41:00 PM

According to some text I am reading you should avoid having any static members on your MarshallByRef object as they will always execute in the context of the calling AppDomain and not your secondary AppDomain. I would think that could cause some interesting and complicated bugs within your code if you didn't know about that. I am documenting this here for future reference.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Research | Issues

Timers in .NET

by Mark Shiffer 12/6/2007 10:16:00 AM

I am currently tasked with creating a Job Scheduler windows service and have been doing some threading research. I have come to the conclusion that I will be using a Timer to trigger when the next job is to get fired off. (there are plenty of issues in addition to be dealt with here that I will not mention: cache updating, synchronization issues, etc...). .NET has 3 native timer classes as described below. After reading some information from others who have tried unsucessfully to implement Systm.Timers.Timer in a windows service, I have decided to go with the System.Threading.Timer. I will already be dealing with plenty of threading and synchronization issues, so I would like to limit the possibility of chasing down other problems. The System.Threading.Timer is lighter weight than the System.Timers.Timer, however, the System.Timers.Timer has some nice features, such as, the adding/removing of listeners after the timer has been instantiated. I can see why others decided to try to use it in their services.  

Feature description System.Timers.Timer System.Threading.Timer System.Windows.Forms.Timer
Support for adding and removing listeners after the timer is instantiated. Yes No Yes
Supports call backs on the user-interface thread Yes No Yes
Calls back from threads obtained from the thread pool Yes Yes No
Supports drag-and-drop in the Windows Forms Designer Yes No Yes
Suitable for running in a server multi-threaded environment Yes Yes No
Includes support for passing arbitrary state from the timer initialization to the callback. No Yes No
Implements IDisposable Yes Yes Yes
Supports one-off callbacks as well as periodic repeating callbacks Yes Yes Yes
Accessible across application domain boundaries Yes Yes Yes
Supports IComponent – hostable in an IContainer Yes No Yes

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Research | Issues

Visual Studio Team Foundation Server

by Mark Shiffer 11/16/2007 10:27:00 PM

I recently installed Visual Studio Team Foundation Server and I must say this was the worst install experience that I have ever had with a product. Microsoft intertwined this product with so many dependencies and made it so brittle that I am concerned that my move to team for source control was a mistake. However, I am going to give it a shot to see how it works. We are about to make the move at work (full-time job) and figure I should investigate. So far, I am not too impressed with the client. It is missing many key features and/or makes them difficult to accomplish. I'm still at the new stage so we will see how things play out.

 One word of advice for anyone who is installing team server: Read the documentation and carefully follow EVERY step for the installation. Do not deviate, even in the slightest, or you will get burned. It is ridiculous how touchy the install process is. I seriously doubt that I can afford to stay on Team System at home for my source control due to its fragility. Maybe 2008 will be better.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Issues | Programs

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

by Mark Shiffer 10/16/2007 10:18:00 PM
After moving my projects to a share on the server so that they could be automatically backed up (I have installed source control yet as Team Foundation Server is giving me fits about all sorts of stuff. That is one of the pickiest installs I have ever seen!), I started receiving the following error when I tried to compile my website: "Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." I did a little searching and found that I could add full trust for the share at the machine level to solve the issue. The command was: CasPol.exe -q -m -ag 1.2 -url file://s:\Mark\* FullTrust -n s:\Mark -d "FullTrust granted to: s:\Mark".

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Issues

Force Office 2007 Document to Open in Browser Window on Vista

by Mark Shiffer 10/15/2007 12:02:00 PM

I ran across an issue today that Vista made a bit difficult to get around. It appears that Microsoft removed the option to turn on/off the "Browse in same window" option in Vista for file type associations. In prior versions, to make Internet Explorer show a word or excel document in the browswer instead of opening a new window, one could simply go to Tools..Folder Options, click on the File Types tab, find the file type you wanted to alter and click the Advanced Tab. There was then a check box to allow browsing in the same window or to force office to open the document outside of the browser.

In Vista, file types are altered via Default Programs in the Control Panel, option titled "Associate a file type or protocol with a program". Unfortunately, the advanced options available in prior versions of windows are no longer there. To get around this, the only way I have found thus far is to use regedit and make the following changes for Excel:

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.8]
"BrowserFlags"=0

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.12]
"BrowserFlags"=0

To force new windows instead of keeping it in the same window, use 8 instead of 0.

Microsoft has a knowledge base article on this that details the keys for other Office documents as well at:

www.mssoftwareconsulting.com/general/Refer.aspx?url=http://support.microsoft.com/?scid=kb;en-us;162059

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Issues

ODBC Data Sources on 64-bit machines

by Mark Shiffer 10/2/2007 4:16:00 PM

I recently ran into some issues when attempting to run ODBC on a 64-bit machine. The particular ODBC driver I was using installed as a 32-bit driver, and thus had to be accessed through SysWow64\odbcad32.exe. After setting up the data source and running my application, I recieved the error "Data source name not found and no default driver specified" even though it was clearly setup. After doing some digging I found that the application was compiled with the 'Any CPU' option. I am not entirely clear here, but it appears that when the application runs on a 64-bit machine it will run as a 64-bit application and only look at the 64-bit data sources on the machine. If I compile the application with a platform target of x86, and run it on the 64-bit machine it runs and looks at the 32-bit data sources. Problem solved.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Issues

.NET Framework 3.0 Installation Failure

by Mark Shiffer 9/26/2007 4:38:00 PM

Today I was attempting to install version 3 of the .NET framework on a Windows XP SP2 machine. I had a heck of a time trying to get this to install. I thought I would run through my steps in case anyone else (or myself later on) could find it useful (all of the failed logs are attached):

  1. Attempted to install framework via .NET 3 download from Microsoft
  2. The install logged 3 files: VSSWMSIFailInfo.txt (not helpful), VSSWMSIInstallTime.txt (not helpful), VSSWMSISummayr.txt
  3. In the summary file I noticed that it said "Windows Communication Foundation -- Installation failed"
  4. I happened to find reference in some forums to wcf installation logs being stored in C:\Documents and Settings\[User]\Local Settings\Temp\dd_wcf_retMSI34B1.txt
  5. So that told me that the installation of WCF was failing, but all it was giving was a general 1603 error.
  6. I found another forum entry that gave reference to a tool to clean the machine of any previous .NET framework version 3 installs. I was fairly certain that was not my issue, but I ran it regardless. It did not find anything: http://download.microsoft.com/download/e/7/a/e7a1e547-b335-4043-b10d-70da84835dca/vs_uninst_winfx.exe
  7. Next I looked at the event log to see what was there. A long list of warnings accompanied by an error were happening during the install:
    1. System.InvalidCastException: Specified cast is not valid.
         at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
         at System.Management.ManagementScope.InitializeGuts(Object o)
         at System.Management.ManagementScope.Initialize()
         at System.Management.ManagementScope.Connect()
         at System.ServiceModel.Install.WmiInstallComponent.get_IsInstalled()
         at System.ServiceModel.Install.WmiInstallComponent.ApplyNamespaceDacl(OutputLevel outputLevel)
         at System.ServiceModel.Install.WmiInstallComponent.OnInstall(OutputLevel outputLevel)
         at System.ServiceModel.Install.WmiInstallComponent.Reinstall(OutputLevel outputLevel)
         at Microsoft.Tools.ServiceModel.ServiceModelReg.PerformAction(ActionItem actionItem, Nullable`1 confirmUninstall)
         at Microsoft.Tools.ServiceModel.ServiceModelReg.Run(String[] args)
         at Microsoft.Tools.ServiceModel.ServiceModelReg.TryRun(String[] args)
    2. Failure executing "C:\WINNT\system32\wbem\mofcomp.exe" with parameters ""C:\WINNT\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModel.mof"": System.ApplicationException: Unexpected result 3 executing C:\WINNT\system32\wbem\mofcomp.exe with "C:\WINNT\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModel.mof"
         at System.ServiceModel.Install.InstallHelper.ExecuteWait(String program, String parameters, Int32[] allowedExitCodes)
         at System.ServiceModel.Install.WmiInstallComponent.OnInstall(OutputLevel outputLevel)
    3. A TransportConfiguration node does not exists in the system.web section for protocol msmq.formatname in C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config.
    4. A Protocol node does not exists in the system.web section for protocol msmq.formatname in C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config.
    5. HttpModules node ServiceModel does not exist in System.Web section group.
    6. HttpHandlers node *.svc does not exist in System.Web section group
    7. All compilation assembly nodes do not exist in System.Web section group.
    8. A configuration entry for BuildProvider System.ServiceModel.Activation.ServiceBuildProvider, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 does not exist.
    9. Configuration section system.serviceModel.activation does not exist in C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\machine.config.
    10. Configuration section system.runtime.serialization does not exist in C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\machine.config.
    11. Configuration section system.serviceModel does not exist in C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\machine.config.
  8. Next, and the solution, I ran a tool to diagnos issues with WMI (Windows Management Instrumentation Service) http://www.microsoft.com/downloads/details.aspx?familyid=D7BA3CD6-18D1-4D05-B11E-4C64192AE97D&displaylang=en (again found in the forums)
  9. This gave me a list of errors:
    1. Missing: C:\WINNT\System32\WBEM\wbemsvc.dll
    2. WMI MONIKER CONNECTION errors occured for the following namespaces: Root, 0x1AE - Class doesn't support Automation.
    3. WMI CONNECTION errors occured for the following namespaces: Root, 0x80004002 - No such interface supported.
  10. I copied the wbemsvc.dll from another computer that was running fine, restarted the WMI service and reran the installation. This time it worked!

I have attached a zip file containing the diagnostic tool and all of my original log files for reference. I hope this helps others who are struggling with this.

FrameworkInstallErrors.zip (1.17 mb)

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Issues

Sending Large Responses Back From ASP.NET

by Mark Shiffer 9/20/2007 6:46:00 PM

I recently ran into some issue when attempting to transmit large files as a response to an ASP.NET request. My App was set up with the following standard code:

Response.AddHeader("Content-Length", info.Length.ToString());

Response.ContentType = "application/octet-stream";

Response.AppendHeader("Content-Disposition", "attachment;filename=" + info.Name);

Response.WriteFile(path);

 It turns out that WriteFile causes the server to attempt to buffer the response, and with a large file this just makes the server sit and time out with no useful error message being returned. I first got thrown off and attempted to increase buffer limits in IIS (defaulted to 4MB), but that did not help the issue. I then found Response.TransmitFile which does not buffer the response. So far, Response.TransmitFile appears to have fixed the issue. The files in question were 75MB to 100MB a piece. I had tested and 20MB files were able to make it through with the original code (odd with IIS's default limit being 4MB). So, I am not certain where the cutoff is, and what, if any, setting would allow Response.WriteFile to function for larger files.

Another odd part about this error was that when running locally in debug mode in VS, I had no problems. The file was still located on a network server. However, when the application was run from the server the error occurred.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Issues

About the author

Name of author Mark Shiffer
CEO & CIO of MS Consulting

E-mail me Send mail

Calendar

<<  May 2008  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar

Pages

    Recent posts

    Recent comments

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in

    Copyright © 2001-2008 MS Consulting, Inc. All Rights Reserved.