7/6/2015 2:07:43 PM
70
Reputation
10
Total posts
Hi Slaven and imarusic,
Thank you for your valuable and kind assistance with this issue. I was able to get the user control override working this past weekend.
Here is what I did in the hopes it will help others - Even though I went back through and set up MonoX exactly as described in the readme.txt file in the installation root, I still kept having issues with extending the Login user control and even the test1.ascx that imarusic sent did not work either. My application would build and run just fine when I took out the test1.ascx and codebehind test1.ascx.cs file, so it was maddening.
I noticed that every time I put in the test1.ascx control into the project I always had to change the line in the example test1.ascx from CodeBehind="Test1.ascx.cs" to CodeFile="Test1.ascx.cs", which did not seem right to me so I started Googling the issue.
It turns out that even when MonoX is set up correctly, because there is not a .sln file included in the installation root, Visual Studio 2013 by default opens the MonoX installation as a WEB SITE, not a WEB APPLICATION. This is wrong, wrong, wrong and is the reason my tests were failing. It needs to run as a web application.
Despite my best efforts I could not get VSS 2013 to open it as a web application. So....I used VSS 2013 to create a brand new <empty> web application (not web site), made sure it compiled OK, then copied the MonoX files into the new web application directory and included all of the MonoX files and folders with it. I compiled it and made sure it ran, then went through the installation pages to install it on my server. When I put in the Test1.ascx user control example into the solution I found I did not need to change the CodeBehind to CodeFile - then I changed the reference to the user control in Login.aspx to the new Test1.ascx control and it worked like a charm.
The key I found is to always run it as a web application, not a web site. I'm sure this is in the documentation somewhere but again by default VSS2013 wants to open it as a web site. If you don't see a 'PROJECT' option in the VSS 2013 menu bar it is opened as a web site and not an application.
I think it would be helpful to include a .sln solution file in the build that configures it as an application and not a site - so other folks can avoid the behavior and frustration that I did.
So...I am up and running and my confidence is restored. :-) Thanks again for your kindness and assistance.
Regards
Shawn
Rating history (Content is rated 0.00 of 0 vote(s).)
Shows who have rated the content, and the rating score.