Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Ben Miller's Blog

What about ASP.NET can I tell you...

  • MSDN Smart Client Developer Center REBOOTED:

    Check out this entry from Jonathan Wells about the MSDN Smart Client Developer Center

    This is the link http://blogs.msdn.com/onoj/archive/2004/12/03/274799.aspx

    From the site 'The goal of the site is to help you understand smart clients, what they are, when they are most appropriate, and most importantly, the best and most efficient way to construct them.'

    This is a great resource for anyone doing Smart Client development.

  • Installing VS 2005 Beta 1 Refresh with Team Server

    I spent the better part of my day a couple of days ago helping out someone having problems installing Visual Studio 2005 Beta 1 Refresh with Team System. 

    It was such an experience that I decided to blog about it.

    I began with 2 VPC images (cause I found out that you could install it on 2 machines and could not install it on 1) with Windows Server 2003 on them.  The first thing I recommend is to become familiar with the Installation Roadmap that is on the DVD’s.  This illustrates that you need a DB Server (for the DB Tier) and a Application Box (for App Tier, and Client Tier).  On the DB Tier machine (VPC) I created a domain controller and Active Directory.  I allowed the installer to create a DNS server so that I could have name resolution between the 2 VPC’s.  I then added the Server Role of Application Server (IIS and ASP.NET Enabled).  I then installed SQL Server 2005 Beta 2 that came with the VS 2005 Beta 1 Refresh DVD, and configured it as the DEFAULT instance (as this is required for this version of TS).

    Then I turned to the other VPC.  I joined it to the domain I just created and then added the Server Role of App Server (IIS and ASP.NET but NOT Frontpage Server Extensions as it will break the install).  Then created a User that is a domain account and gave it admin rights.  This will be used for the Application Pool identity.  Then the key was to install the components that were on the list of components to install from the Roadmap.  (included .NET Framework 2.0, Sharepoint Services 2.0 – link is in the Roadmap, and ADAM.)

    These are the short steps, but the key is to follow the Roadmap and I highlighted the main points that cannot be missed or you will not succeed in installing it (from my experience).

    1.      DB Server must be installed as the Default Instance.

    2.      App Server Role on AppTier cannot have FrontPage Server Extensions enabled.

    3.      IIS Installed before the SQL 2005 Beta 2 is installed on the DBTier.

    What you will see that may alarm you when you install is when you go to install Team Server on the App Tier is that the install will hang installing the newbanner.gif file and it will continue to bring the blue bar across as it is installing.  There will be no visual indication that it is connecting to the DB Tier to create databases, etc.  but that is what it is doing.  I found out this by when I installed the Database Server as a named instance, it would continue to go after the newbanner.gif and then it would fail with a 26205 and a 26201 and a 26204 error.  In the event logs, I found that it indicated that it could not connect to the server (db).  When I changed the DB Tier to be a default instance of SQL, then it succeeded (and it took a while, so be patient).

    Hope this helps people out there that may run into problems.  I did this on VPC using Virtual Server 2005 on 1 box with 2 VPC’s each with 256 MB RAM.  More would have been better, but it worked at least.

    Have a great one.

  • Setting up a new .Text site (personal)

    I thought I would post my adventures with .Text setup so that some people may benefit.

    I currently have a blog at http://blogs.msdn.com/benmiller and this is my space on Microsoft’s turf.  I have had a personal blog out on www.benmiller.net/blog and have not done much to publicize it.  So I thought that instead of cluttering up the site and having to avoid the /blog application on benmiller.net I would make a blog site at http://blog.benmiller.net.

    So the first thing I did was to put the code that I used for my original personal blog on my new site.  Then I used the same database which is a great thing about .Text and the configs.  I then proceeded to do the IIS mapping described, which is to map .* to the aspnet_isapi.dll in IIS. I tried to pull up the site and it was gross looking.  

    I got really frustrated after I added the blog to the blog_config table and browsed the new site and got nothing but a weird page.  To make a long story short, I found out that if you have the .* mapped to the ISAPI, then you have to add the following lines to the web.config:

    <blockquote>
    <HttpHandler pattern = "(\.config|\.asax|\.ascx|\.config|\.cs|\.csproj|\.vb|\.vbproj|\.webinfo|\.asp|\.licx|\.resx|\.resources)$" type = "Dottext.Framework.UrlManager.HttpForbiddenHandler, Dottext.Framework" handlerType = "Direct" />
    <HttpHandler pattern = "(\.gif|\.js|\.jpg|\.zip|\.jpeg|\.jpe|\.css)$" type = "Dottext.Common.UrlManager.BlogStaticFileHandler, Dottext.Common" handlerType = "Direct" />
    </blockquote>

    You can remove the above if you do not map .* to aspnet_isapi.dll.

    Then I found out that I could view the blogs, but could not for the life of me login to the admin.  I could post an entry from another application (newsgator) and the post would show up.  Well, after a long time of trying whatever I could, I thought I would try to login to my blog.benmiller.net on another machine.  Well, I was able to.  Now what?

    I noticed that when I went to http://www.benmiller.net/blog that I was already logged in so I could just go into admin.  I began to think about cookies, and since I had different usernames and passwords for each site, there had to be a conflict.

    This is what I found.  I found out that a cookie was being written for benmiller.net and it was conflicting with me trying to login to the admin on http://blog.benmiller.net since benmiller.net is the root domain.  When I deleted that cookie, I was able to login to my admin on blog.benmiller.net.

    I am clear now and will make sure that I don’t have conflicting cookies any more.

    I hope that this helps someone, and I would be happy to answer any questions about what I found, as this was a 3 day process.

    Happy Blogging….

  • New CTP versions of Visual Studio 2005 Express

     If you have not yet, you can go here http://lab.msdn.microsoft.com/vs2005/downloads/default.aspx and get the latest Community Tech Preview of the Visual Studio 2005 Express Versions.   

     

  • Rob Howard will be speaking at SLC User Group

    I am excited to be able to have Rob Howard come and speak to our User Group tomorrow at 6:00 PM.  Salt Lake is growing in the .NET space and in the recognition of the need for User Group meetings.  Rob is coming with the INETA Speakers Bureau and will be our speaker for the night.

    For those in the Salt Lake Area, join us for a great night of ASP.NET 2.0 stuff.

  • Brad Abrams talk at the San Jose dotNet User Group...

    I attended the San Jose dotnet User Group  and listened to Brad talk about the CLR.  It was a FANTASTIC talk and was very informative.

    We talked about the architecture of the CLR and where the BCL’s sit (that is what Brad worked on is the BCL’s).  He just gave a great talk.

    One thing that I thought was interesting is that I actually knew what a Singleton was and how it was defined as a Pattern.  I was pretty much amazed that I understood.  We had a talk in the SLC DotNet User Group about that and Aaron Zupancic (don’t know if Aaron has a blog) gave a great talk on Patterns in development.  Singleton happened to be one of them.  Brad called it the “double check lock”.

    Anyone who does not currently attend a User Group, should hop onto INETA’s website and find the local one and get involved.  It is a great time and you even learn things.

    Great job Brad.

  • Directory name changes in ASP.NET 2.0

    Be sure to get a look at Brian Goldfarb’s post on directory name changes for ASP.NET 2.0.

     

  • PICT to JPG image format

    I encountered another interesting question.  This individual is using an application that has PICT formatted pictures stored in a database Image field.  This data is then brought out of the database and put in an image control.  The problem is that this app that is being written cannot use PICT images and therefore PICT needs to be able to be converted programmatically.  I found that there are many apps including the ones at 2jpeg.com but they are not components that can be used inside code.  It is a console application (command line app) that can run without a UI but is an app that must be launced.

    I found LeadTools products, but then found out that the .NET Vector Imaging product was 2000.00.  So that puts it out of reach for someone developing an app that is for one customer or friend or whatever.

    I was a little disappointed on how little conversion code there was for things like this as we get more standardized on coding techniques, etc. there is still a gap in the imaging front between platforms (PICT = Mac, JPG = Windows, etc.)

    Just an interesting day here at BorCon. 

  • How do I change the value in an XsltArgumentList

    I encountered a customer today with a question.  Remember I am at BorCon this week.

    The question was around the XsltTransform and using parameters.  So I quickly looked up the object and the method of Tranform and found that indeed I could pass parameters in an XsltArgumentList.  Now the question was this.  If I am using the same xslt and the same parameters (obviously), but want to just change the value of the parameter for another run, how do I do this?

    So I looked up the XsltArgumentList and found that there is an AddParam, and a GetParam, and a RemoveParam, but there no reference to an indexer, or anything that would allow me to change the value of the parameter without doing a RemoveParam and an AddParam.  Then there is the curious  GetParam and it returning an Object instead of a type of like say XsltArgument so that you can just change the value or the namespace without removing and re-adding with a new value.

    Are there any takers?  I could not find anything on it and it would be great to learn a little more about a space that I have little experience in.

  • Pesky "Page cannot be displayed" error...

    I was having problems where after I installed XP Service Pack 2 on my Tablet, that I could not click a hyperlink in OE and then sometimes in Outlook 2003. It would bring up the “Page cannot be displayed” error.  I looked and looked, then I stumbled onto something while playing with some settings.

     

    I had a thought, I wonder if it is related to having LAN Settings in IE set to Automatically Detect settings...

    I went in and unchecked the Automatically Detect settings, and now I can click links in both Outlook 2003 and OE and they actually navigate to the sites.

    Thought I would share for all those with the same issue.  This is OE 6 and IE 6.1 and Outlook 2003 on Tablet PC 2005 (XP SP2).

  • Going to Borcon 2004

     I was browsing some blogs and found my buddy Euan Garden and found that he blogged about going to Borcon 2004.

    I will be there as well, and I am going to be helping out in the booth.  If you are going, and want to meet up, let me know in the comments.

    Have a great one.

  • Christian Weyer's WsContractFirst

    I just downloaded Christian Weyer’s WsContractFirst Visual Studio Add-In.  I wanted to try it because I want to bind the results of the webservices I call to a DataGrid or another databind-able control.  This worked like a champ.  On the above site it explains what the tool does, but I wanted to tell Christian that it was a very nice thing to have.  Making the public fields into Properties is a great time saver as I would have had to do it by hand.

    Integration with Web Services will be more fun now.

  • My first blog post from my new tablet PC.

     I are my new tablet and thought that I world post. Tonight was the Salt Lake Dot Net users group. Our meeting sponsor was 6PM at www.sixpm.com .

    The talk was on Design Patterns and was given by Aaron Zupancic. He did a fantastic job and I think the meeting was very well attended. We had about 40 people there.   Aaron talked about practices and patterns that we may use in design. Some were Singleton, Façade, Observer and Adapted. He did a great job and even showed code examples as well.  I found out that singleton objects are those that will only be instantiated1 time per appdomain.  

    At the end of the night we found out that Rob Howard will be coming on October 7th to speak to us on Whidbey.

    It was a great meeting.  All this was written on my tablet and it definitely took longer than me typing it. But I got more familiar with my input panel (the new one that came with XP sp2 on a tablet that is XP Tablet Edition 2005) in the process.