Search Results

Search found 22 results on 1 pages for 'icky'.

Page 1/1 | 1 

  • There's IP but can't reach gateway

    - by icky
    I have just installed ubuntu 12.04 on my new laptop, and brought it back to home, but I found the wireless network does not work. Strangely, it has the correct ip, but can't connect to the gateway. ifconfig gives ip 192.168.64.36, with broadcast 192.168.79.255 and mask 255.255.240.0, this are all correct, the gateway is at 192.168.64.1 cat /etc/resolv.conf nameserver 192.168.64.1 nameserver 127.0.0.1 which i think it's also right. but when I ping 192.168.64.1, all packages are lost. Please help me with this, I really do not know what happened to my network settings. Huckle, Thank you for your reply ifconfig wlan0 Link encap:Ethernet Hwaddr 88:f9:af:2a:ca:1b inet addr:192.168.64.36 Bcast:192.168.79.255 Mask:255.255.240.0 inet6 addr: fe80::8a9f:faff:fea2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:27 errors:0 dropped:0 overruns:0 frame:0 TX packets:376 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3950 TX byetes:60288 iwconfig wlan0 IEEE 802.11bgn ESSID:"Chiono" Mode:Managed Frequency:2.417 GHz Access Point: 82:54:99:94:6D:43 Bit Rate=13.5 Mb/s Tx-Power=13 dBm Retry long limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:on Link Quality=70/70 Signal Level=-32 dBm Rx invalid nwid:0 Rx invalid crypt:0 RX invalid frag:0 Tx excessive retries: 9 Invalid misc:10 Missed beacon:0 route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.64.1 0.0.0.0 UG 0 0 0 wlan0 link-local * 255.255.0.0 U 1000 0 0 wlan0 192.168.64.0 * 255.255.240.0 U 2 0 0 0 wlan0 Thank you very much

    Read the article

  • UIScrollview doesnt resize in NavigationController when rotated

    - by Icky
    Hey, I have been dealing with this issue for 2 days now, not able to find a solution. I have a navigationcontroller as a root view controller. This one pushes a UIViewcontroller which in turn has a UIScrollview I created with IB. Additionally there is the Navigation bar. My problem arises, when I rotate the IPhone to Landscape mode. In -(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation I want my scrollview to take up the full width (480 px) which it doesnt. I am able to set the frame of the navigation bar to full width perfectly fine, but not the scrollview. I have read that this might be because of the autoresizing masks set in the rooviewcontroller but I have tried out a couple of solutions - none worked for me. Any ideas on how to challenge the problem? Dont know where to start looking.

    Read the article

  • Prerequisites for Account management via an IPhone App?

    - by Icky
    Hello. I have been reading a couple of threads for this topic on this site. I want to create an App, which communicates with a server and has the following features: the User can create/manage an account on the server the App communicates with the server via a secure connection the User is updated about important news through messages From what I understood so far, I need to take care of the following: establish a secure connection with the server send account information(user data, password) to the server and authenticate the client side management and encryption of account data/information is handled by the server, so the App only sends data, the server stores/encrypts (no need for me to take care of anything) So far, I think, I have covered the most important features. I have read, that NSURLConnection can be used, to send the authentication data. But how is further communication ensured? And how is the encryption managed? Are there any useful tutorials on this, because this is the first time I delve into this topic, and any guidance is greatly appreciated! Also, if I have missed anything important (e.g. with managing accounts) please tell me.

    Read the article

  • Detecting Touches in an OpenGL rendered scene

    - by Icky
    Hey. I was wondering whether there is a way to detect a touch in an OpenGL rendered scene. What I have i a set of images which are being rendered in my main view. Now if the user touches one of these images (or objects) I would like to know which one was touched - similar to the CGRectContainsPoint(frame, [touch locationInView:self.view] method. Is there an easy way to find out? If there is none, this would also help.

    Read the article

  • Loading images to UIScrollview crashes

    - by Icky
    Hello All. I have a Navigationcontroller pushing a UIViewController with a scrollview inside. Within the scrollview I download a certain number of images around 20 (sometimes more) each sized around 150 KB. All these images are added to the scrollview so that their origin is x +imageSize and the following is sorted right to the one before. All in all I think its a lot of data (3-4 MB). On an I pod Touch this sometimes crashes, the IPhone can handle it once, if it has to load the data again (some other images) , it crashes too. I guess its a memory issue but within my code, I download the image, save it to a file on the phone as NSData, read it again from file and add it to a UIImageview which I release. So I have freed the memory I allocated, nevertheless it still crashes. Can anyone help me out? Since Im new to this, I dont know the best way to handle the Images in a scrollview. Besides I create the controller at start from nib, which means I dont have to release it, since I dont use alloc - right? Code: In my rootviewcontroller I do: -(void) showImages { [[self naviController] pushViewController:imagesViewController animated:YES]; [imagesViewController viewWillAppear:YES]; } Then in my Controller handling the scroll View, this is the method to load the images: - (void) loadOldImageData { for (int i = 0; i < 40 ; i++) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *filePath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"img%d.jpg", i]]; NSData *myImg = [NSData dataWithContentsOfFile:filePath]; UIImage *im = [UIImage imageWithData:myImg]; if([im isKindOfClass:[UIImage class]]) { NSLog(@"IM EXISTS"); UIImageView *imgView = [[UIImageView alloc] initWithImage:im]; CGRect frame = CGRectMake(i*320, 0, 320, 416); imgView.frame = frame; [myScrollView addSubview:imgView]; [imgView release]; //NSLog(@"Adding img %d", i); numberImages = i; NSLog(@"setting numberofimages to %d", numberImages); //NSLog(@"scroll subviews %d", [myScrollView.subviews count]); } } myScrollView.contentSize = CGSizeMake(320 * (numberImages + 1), 416); }

    Read the article

  • Iphone memory leak with malloc

    - by Icky
    Hello. I have memory leak, found by instruments and it is supposed to be in this line of code: indices = malloc( sizeof(indices[0]) * totalQuads * 6); This is actually a code snippet from a tutorial, something which i think is leak-free so to say. Now I reckon, the error is somewhere else, but I do not know, where. These are the last trackbacks: 5 ColorRun -[EAGLView initWithCoder:] /Users/thomaskopinski/programming/colorrun_3.26/Classes/EAGLView.m:98 4 ColorRun -[EAGLView initGame] /Users/thomaskopinski/programming/colorrun_3.26/Classes/EAGLView.m:201 3 ColorRun -[SpriteSheet initWithImageNamed:spriteWidth:spriteHeight:spacing:imageScale:] /Users/thomaskopinski/programming/colorrun_3.26/SpriteSheet.m:68 2 ColorRun -[Image initWithImage:scale:] /Users/thomaskopinski/programming/colorrun_3.26/Image.m:122 1 ColorRun -[Image initImpl] /Users/thomaskopinski/programming/colorrun_3.26/Image.m:158 0 libSystem.B.dylib malloc Does anyone know how to approach this?

    Read the article

  • How to manage long running background threads and report progress with DDD

    - by Mr Happy
    Title says most of it. I have found surprising little information about this. I have a long running operation of which the user wants to see the progress (as in, item x of y processed). I also need to be able to pause and stop the operation. (Stopping doesn't rollback the items already processed.) The thing is, it's not that each item takes a long time to get processed, it's that that there are usually a lot of items. And what I've read about so far is that it's somewhat of an anti-pattern to put something like a queue in the DB. I currently don't have any messaging system in place, and I've never worked with one either. Another thing I read somewhere is that progress reporting is something that belongs in the application layer, but it didn't go into the details. So having said all this, what I have in mind is the following. User request with list of items enters the application layer. Application layer gets some information from the domain needed to process the items. Application layer passes the items and the information off to some domain service (should the implementation of this service belong in the infrastructure layer?) This service spins up a worker thread with callbacks for both progress reporting and pausing/stopping it. This worker thread will process each item in it's own UoW. This means the domain information from earlier needs to be stored in some DTO. Since nothing is really persisted, the service should be singleton and thread safe Whenever a user requests a progress report or wants to pause/stop the operation, the application layer will ask the service. Would this be a correct solution? Or am I at least on the right track with this? Especially the singleton and thread safe part makes the whole thing feel icky.

    Read the article

  • Queueing up character actions

    - by TheBroodian
    I'm developing a 2D platformer with action-fighter elements. Currently things are working relatively smoothly but I'm having difficulty sorting something out. For the time, keeping my character's states and actions separated and preventing them from stepping on each others' toes is working out well and properly, but I would like to add a feature to my character to get him to behave a little bit more fluidly for the player. At the moment, he has numerous attacks and abilities that he can execute, all of them being executed with button presses. Here lies the problem: Being as everything is executed through button presses, while an action is in progress I flag the game to disregard further button presses until the action has completed. Therefore, consecutive actions cannot be performed until after the previous action has completed entirely. In runtime this behavior feels very icky, and very ungamelike. In games that rest most memorably at the forefront of my mind the player is able to execute button commands during the process of actions, and at the end of the current action, the following action is executed (seems like some sort of a queue system or something) Can anybody offer any guidance with this?

    Read the article

  • ASP.Net double-click problem

    - by David Archer
    Hi there, having a slight problem with an ASP.net page of mine. If a user were to double click on a "submit" button it will write to the database twice (i.e. carry out the 'onclick' method on the imagebutton twice) How can I make it so that if a user clicks on the imagebutton, just the imagebutton is disabled? I've tried: <asp:ImageButton runat="server" ID="VerifyStepContinue" ImageUrl=image src ToolTip="Go" TabIndex="98" CausesValidation="true" OnClick="methodName" OnClientClick="this.disabled = true;" /> But this OnClientClick property completely stops the page from being submitted! Any help? Sorry, yes, I do have Validation controls... hence the icky problem.

    Read the article

  • null coalescing operator for javascript?

    - by Daniel Schaffer
    I assumed this question has already been asked here, but I couldn't find any, so here it goes: Is there a null coalescing operator in Javascript? For example, in C#, I can do this: String someString = null; var whatIWant = someString ?? "Cookies!"; The best approximation I can figure out for Javascript is using the conditional operator: var someString = null; var whatIWant = someString ? someString : 'Cookies!'; Which is sorta icky IMHO. Can I do better?

    Read the article

  • What's the cleanest way to programmatically kill and restart explorer.exe?

    - by Paul Accisano
    Greetings all, I'm working on a Windows program whose installation necessitates restarting explorer.exe. I know "Reboot your computer to complete the installation" is the standard method here, but I'd like my installer to give users the option of just restarting Explorer so they can start using my program immediately. What's the best way to do that? Of course I could just find and kill the process, but that seems rather icky. Is there some trick to, say, make Explorer think the user is logging off and close cleanly? Thanks!

    Read the article

  • Passing HttpFileCollectionBase to the Business Layer - Bad?

    - by Terry_Brown
    hopefully there's an easy solution to this one. I have my MVC2 project which allows uploads of files on certain forms. I'm trying to keep my controllers lean, and handle the processing within the business layer of this sort of thing. That said, HttpFileCollectionBase is obviously in the System.Web assembly. Ideally I want to call to something like: UserService.SaveEvidenceFiles(MyUser user, HttpFileCollectionBase files); or something similar and have my business layer handle the logic of how and where these things are saved. But, it feels a little icky to have my models layer with a reference to System.Web in terms of separation of concerns etc. So, we have (that I'm aware of) a few options: the web project handling this, and my controllers getting fatter mapping the HttpFileCollectionBase to something my business layer likes passing the collection through, and accepting that I reference System.Web from my business project Would love some feedback here on best practice approaches to this sort of thing - even if not specifically within the context of the above.

    Read the article

  • Collection of dependencies in castle windsor

    - by jonnii
    I have the following scenario: public class FirstChildService : IChildService { } public class SecondChildService : IChildService { } public class MyService : IService { public MyService(IEnumerable<IChildService> childServices){ ... } } I'm currently registering all the child services and explicitly depending on them in the constructor of MyService, but what I'd like to do is have them all injected as part of a collection. I can think of a few ways to do this: Using a facility Using a component property Registering the collection as a service But all of them feel a bit... icky. What's the best way to manage this? Also, ideally I'd like to do this using the fluent API and constructor injection. I know it's possible to do something similar using properties: http://www.castleproject.org/container/documentation/trunk/usersguide/arrayslistsanddicts.html

    Read the article

  • Handling bugs, quirks, or annoyances in vendor-supplied headers

    - by supercat
    If the header file supplied by a vendor of something with whom one's code must interact is deficient in some way, in what cases is it better to: Work around the header's deficiencies in the main code Copy the header file to the local project and fix it Fix the header file in the spot where it's stored as a vendor-supplied tool Fix the header file in the central spot, but also make a local copy and try to always have the two match Do something else As an example, the header file supplied by ST Micro for the STM320LF series contains the lines: typedef struct { __IO uint32_t MODER; __IO uint16_t OTYPER; uint16_t RESERVED0; .... __IO uint16_t BSRRL; /* BSRR register is split to 2 * 16-bit fields BSRRL */ __IO uint16_t BSRRH; /* BSRR register is split to 2 * 16-bit fields BSRRH */ .... } GPIO_TypeDef; In the hardware, and in the hardware documentation, BSRR is described as a single 32-bit register. About 98% of the time one wants to write to BSRR, one will only be interested in writing the upper half or the lower half; it is thus convenient to be able to use BSSRH and BSSRL as a means of writing half the register. On the other hand, there are occasions when it is necessary that the entire 32-bit register be written as a single atomic operation. The "optimal" way to write it (setting aside white-spacing issues) would be: typedef struct { __IO uint32_t MODER; __IO uint16_t OTYPER; uint16_t RESERVED0; .... union // Allow BSRR access as 32-bit register or two 16-bit registers { __IO uint32_t BSRR; // 32-bit BSSR register as a whole struct { __IO uint16_t BSRRL, BSRRH; };// Two 16-bit parts }; .... } GPIO_TypeDef; If the struct were defined that way, code could use BSRR when necessary to write all 32 bits, or BSRRH/BSRRL when writing 16 bits. Given that the header isn't that way, would better practice be to use the header as-is, but apply an icky typecast in the main code writing what would be idiomatically written as thePort->BSRR = 0x12345678; as *((uint32_t)&(thePort->BSSRH)) = 0x12345678;, or would be be better to use a patched header file? If the latter, where should the patched file me stored and how should it be managed?

    Read the article

  • JAXB - Beans to XSD or XSD to beans?

    - by bajafresh4life
    I have an existing data model. I would like to express this data model in terms of XML. It looks like I have two options if I'm to use JAXB: Create an XSD that mirrors my data model, and use xjc to create binding objects. Marshalling and unmarshalling will involve creating a "mapping" class that would take my existing data objects and map them to the objects that xjc created. For example, in my data model I have a Doc class, and JAXB would create another Doc class with basically the same exact fields, and I would have to map from my Doc class to xjc's Doc class. Annotate my existing data model with JAXB annotations, and use schemagen to generate an XSD from my annotated classes. I can see advantanges and disadvantages of both approaches. It seems that most people using JAXB start with the XSD file. It makes sense that the XSD should be the gold standard truth, since it expresses the data model in a truly cross-platform way. I'm inclined to start with the XSD first, but it seems icky that I have to write and maintain a separate mapping class that shuttles data in between my world and JAXB world. Any recommendations?

    Read the article

  • write to fifo/pipe from shell, with timeout

    - by Tim
    I have a pair of shell programs that talk over a named pipe. The reader creates the pipe when it starts, and removes it when it exits. Sometimes, the writer will attempt to write to the pipe between the time that the reader stops reading and the time that it removes the pipe. reader: while condition; do read data <$PIPE; do_stuff; done writer: echo $data >>$PIPE reader: rm $PIPE when this happens, the writer will hang forever trying to open the pipe for writing. Is there a clean way to give it a timeout, so that it won't stay hung until killed manually? I know I can do #!/bin/sh # timed_write <timeout> <file> <args> # like "echo <args> >> <file>" with a timeout TIMEOUT=$1 shift; FILENAME=$1 shift; PID=$$ (X=0; # don't do "sleep $TIMEOUT", the "kill %1" doesn't kill the sleep while [ "$X" -lt "$TIMEOUT" ]; do sleep 1; X=$(expr $X + 1); done; kill $PID) & echo "$@" >>$FILENAME kill %1 but this is kind of icky. Is there a shell builtin or command to do this more cleanly (without breaking out the C compiler)?

    Read the article

  • Eclipse sync workspaces/perspectives/preferences across computers

    - by Naren
    I have a project I need to be working on from two different computers, at work and at home. I need to be able to work on the code from both computers, so the issue is two fold; Sharing the code Sharing the workspace. 1 is simple enough with svn; but I feel icky committing broken code to svn just so I can access that again from home. I can live with this but is there a better option? To elaborate more on 2. I have a highly customized eclipse setup on one of the computers where I spent hours adding plugins and tweaking every tiny config options I could access to get it to the point where it is just right. It'll be a pain redoing every single change on the other computer, is there some way to automatically sync that? I know I can export preferences from Eclipse and import them, but I don't want to have to manually do that each time I change something. [Also, I don't think exporting preferences also exports perspectives?] Both computers run windows.

    Read the article

  • Programmatically Binding to a Property

    - by M312V
    I know it's a generic title, but my question is specific. I think it will boil down to a question of practice. So, I have the following code: public class Component : UIElement { public Component() { this.InputBindings.Add(new MouseBinding(SomeCommandProperty, new MouseGesture(MouseAction.LeftClick))); } } I could easily aggregate the ViewModel that owns SomeCommandProperty into the Component class, but I'm currently waiving that option assuming there is another way. Component is a child of ComponentCollection which is child of a Grid which DataContext is the ViewModel. ComponentCollection as the name suggests contains a collection of Components. <Grid Name="myGrid"> <someNamespace:ComponentCollection x:Name="componentCollection"/> </Grid> It's the same scenario as the XAML below, but with TextBlock. I guess I'm trying to replicate what's being done in the XAML below programatically. Again, Component's top most ancestor's DataContext is set to ViewModel. <Grid Name="myGrid"> <TextBlock Text="SomeText"> <TextBlock.InputBindings> <MouseBinding Command="{Binding SomeCommandProperty}" MouseAction="LeftClick" /> </TextBlock.InputBindings> </TextBlock> </Grid> Update 1 Sorry, I'm unable to comment because I lack the reputation points. Basically, I have a custom control which inherit from a Panel which children are a collection of Component. It's not a hack, like I've mentioned, I could directly have access to SomeCommandProperty If I aggregate the ViewModel into Component. Doing so, however, feels icky. That is, having direct access to ViewModel from a Model. I guess the question I'm asking is. Given the situation that Component's parent UIElement's DataContext is set to ViewModel, is it possible to access SomeCommandProperty without Component owning a reference to the ViewModel that owns SomeCommandProperty? Programatically, that is. Using ItemsControl doesn't change the fact that I still need to bind SomeCommandProperty to each Items.

    Read the article

  • Issues configuring Exchange 2010 as well as SSL problems.

    - by Eric Smith
    Possibly-Relevant Background Info: I've recently moved up from icky shared hosting to a glorious, Remote Desktop-administrated VPS server running Windows Server 2008 R2. Even though I'm only 21 now and a computer science major, I've tried to play with every Windows Server release since '03, just to learn new things. What usually happens is inevitably I'll do something wrong and pretty much ruin the install. You're dealing with an amateur here :) Through the past few months of working with my new server, I've mastered DNS, IIS, got Team Foundation Server running (yay!), and can install all of the other basics like SQL Server and Active Directory. The Problem: Now, these last few weeks I've been trying to install Exchange Server 2010 (SP1). To make a long story short, it took me several attempts, and I even had to get my server wiped just so I could start fresh since Exchange decided uninstalling properly was for sissies (cost me $20, bah). Today, at long last, I got Exchange mostly working. There were two main problems left, however, that left me unsatisfied: Exchange installed itself and all of its child sites into Default Web Site. I wanted to access Exchange via mail.domain.com, but instead everything was configured to domain.com. My limited server admin knowledge was not enough to configure IIS or Exchange to move itself over to the website I had set up for it, appropriately titled 'mail.domain.com', which I had bound to a dedicated IP address (I was told this was necessary, but he may have been wrong). I have two SSL certificates: one for my main domain and one for my mail subdomain. For whatever reason, I had issues geting Exchange to use my mail certificate, even though I had assigned the proper roles in the MMC. I did, at one point, get it to work (or mostly work, anyways. Frankly, my memory of today is clouded by intense frustration). Additionally, I was confused which type of SSL certificate I should be using for Exchange. My SSL provider, GoDaddy, allows me to request a new certificate whenever, so I can use either the certificate request provided by IIS or the more complicated and specific request you can create with Exchange. Which type should I be using, the IIS or Exchange certificate? If I must use the Exchange certificate, will that 1) cause issues when I bind that certificate to my mail.domain.com subdomain or 2) is that an unnecessary step? The SSL Certificate Strikes Back When I thought I had the proper SSL certificate assigned for those brief, sweet moments, Google Chrome reported the correct mail.domain.com certificate when browsing https://mail.domain.com. However, Outlook 2010 threw up an error when trying to configure my email account claiming that the certificate didn't match the domain of "mail.domain.com". Is this an issue that will be resolved by problem #2 or is it a separate one entirely? Apologies for the massive wall of text, but I wanted to provide as much info as I possibly could. Exchange is the last thing I'd like installed on my server, and naturally it's turning out to be the hardest. Thanks for any info at all. Even a point in a vague direction would be a huge help at this point. Thanks! -Eric P.S.: The reason I keep ruining my install is that when I attempt to uninstall Exchange, something invariably goes wrong. The last time the uninstaller complained that there was still a mailbox active and it couldn't proceed until I deleted it. ... The only mailbox left was the Administrator account, the built-in one I couldn't delete. So I attempted to manually uninstall it following several guides online only to now be stuck unable to launch the installer and have to get my system wiped AGAIN for the second time today ($40 down the drain, bah!). I do not understand at all why "uninstall" just can't mean "hey, you, delete everything and go away". There's not even a force uninstall option, only a "recover system" option that just fails to fix anything and makes it so I can't even use the GUI uninstaller. </rant>

    Read the article

  • ASP.NET MVC 2 throws exception for ‘favicon.ico’

    - by nmarun
    I must be on fire or something – third blog in 2 days… awesome! Before I begin, in case you’re wondering, favicon.ico is the small image that appears to the left of your web address, once the page loads. In order to learn more about MVC or any thing for that matter, it’s better to look at the source itself. Since MVC is open source (at least some part of it is), I started looking at the source code that’s available for download. While doing so, I hit Steve Sanderson’s blog site where he explains in great detail the way to debug your app using ASP.NET MVC source code. For those who are not aware, Steve Sanderson’s book - Pro ASP.NET MVC Framework, is one of the best books to learn about MVC. Alrighty, I followed the article and I hit F5 to debug the default / unchanged MVC project. I put a breakpoint in the DefaultControllerFactory.cs, CreateController() method. To know a little more about this class and the method, read this. Sure enough, the control stopped at the breakpoint and I hit F5 again and the page rendered just fine. But then what’s this? The breakpoint was hit again, as if something else was being requested. I now hovered my mouse over the ‘controllerName’ parameter and it says – favicon.ico. This by itself was more than enough for me to raise my eye-brows, but what happened next just took the ground below my feet. Oh, oh, I’m sorry I’m just typing, no code, no image, so here are a couple of screen captures. The first one shows the request for the Home controller; I get ‘Home’ when I hover over the parameter: And here’s the one that shows the same for call for ‘favicon.ico’. So, I step through the code and when the control reaches line 91 – GetControllerInstance() method, I step in. This is when I had the ‘ground-losing’ experience. Wow, an exception is being thrown for this file and that too in RTM. For some reason MVC thinks, this as a controller and tries to run it through the MvcHandler and it hits this snag. So it seems like this will happen for any MVC 2 site and this did not happen for me in the previous version of MVC. Before I get to how to resolve it, here’s another way of reproducing this exception. Revert back all your changes that you did as mentioned in Steve’s blog above. Now, add a class to your MVC project and call it say, MyControllerFactory and let this inherit from DefaultControllerFactory class. (Read this for details on the DefaultControllerFactory class is and how it is used in a different context). Add an override for the CreateController() method and for the sake of this blog, just copy the same content from the DefaultControllerFactory class. The last step is to tell your MVC app to use the MyControllerFactory class instead of the default one. To do this, go to your Global.asax.cs file and add line 6 of the snippet below: 1: protected void Application_Start() 2: { 3: AreaRegistration.RegisterAllAreas(); 4:   5: RegisterRoutes(RouteTable.Routes); 6: ControllerBuilder.Current.SetControllerFactory(new MyControllerFactory()); 7: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Now, you’re ready to reproduce the issue. Just F5 the project and when you hit the overridden CreateController() method for the second time, this is what it looks like for me: And continuing further gives me the same exception. I believe this is something that MS should fix, as not having ‘favicon.ico’ file will be common for most of the applications. So I think the when you create an MVC project, line 6 should be added by default by Visual Studio itself: 1: public class MvcApplication : System.Web.HttpApplication 2: { 3: public static void RegisterRoutes(RouteCollection routes) 4: { 5: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 6: routes.IgnoreRoute("favicon.ico"); 7:   8: routes.MapRoute( 9: "Default", // Route name 10: "{controller}/{action}/{id}", // URL with parameters 11: new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults 12: ); 13: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } There it is, that’s the solution to avoid the exception altogether. I tried this both IE8 and Firefox browsers and was able to successfully reproduce the error. Hope someone will look at this issue and find a fix. Just before I finish up, I found another ‘bug’, if you want to call it, with Visual Studio 2008. Remember how you could change what browser you want your application to run in by just right clicking on the .aspx file and choosing ‘Browse with…’? Seems like that’s missing when you’re working with an MVC project. In order to test the above bug in the other browser, I had to load a classic ASP.NET project, change the settings and then run my MVC project. Felt kinda ‘icky’, for lack of a better word.

    Read the article

1