Why can't I debug/step-into FormsAuthentication.Authenticate? - asp.net

I am having some trouble with active directory authentication using FormsAuthentication in ASP.NET MVC 2 (VS 2010).
As I understand it I should be able to step into/through the Microsoft source code for FormsAuthentication.Authenticate if I check 'Enable source server support' and 'Enable .Net Framework source stepping' in Options->Debug->General and specify 'Microsoft Symbol Servers' in Options->Debug->Symbols.
I have done this and can step into a whole bunch of MS source code, but not FormsAuthentication.Authenticate. The debugger simple steps over it.
Can anyone tell me why this is? If I could step into FormsAuthentication.Authenticate it would make my life a whole lot easier.
Thanks.

Ok, my stupid.
I should have been using Membership.ValidateUser NOT FormsAuthentication.Authenticate.
My problems are all solved :)
However, I never figured out why I could not step into FormsAuthentication.Authenticate. I guess it will remain a mystery...

Related

website migration from target framework 3.5 to 4.5

I need to migrate my website which was earlier in target framework 3.5.
Now i need to convert it into 4.5, Please tell me that best approach to do it.....
I have tried with visual studio 2012 'Build' option to change it to 4.5.
But i am getting lots of script resource error mainly in js file, although these all works fine in 3.5.
After changing it to 4.5 , I m getting so many java script errors.
So, i am missing something.
Need to discuss these errors with you, so currently i am not including any error with you.
Please help me for the the right approach for this.
Any kind of help will be highly appreciated.
Thanks in advance.
You may have problems with some of the HTML elements you have marked as runat="server", specially iFrames.
So, if you a line of code (in you code-in-front) that looks like
<iframe id="myServerSideIframe" runat="server" src=""></iframe>
you are going to have problems loading them.
The reason is that the type of the corresponding variable in your code-behind for most of the HTML elements is "System.Web.UI.HtmlControls.HtmlGenericControl". However, in .Net 4.5, there are specific types for each HTML element, e.g. System.Web.UI.HtmlControls.HtmlIframe.
In order to resolve this, one easy way is changing the Id of that element in code-in-front, and changing it back to the original Id. That way, the designer will automatically update the variable declarations in the designer file.
Had converted web app from 3.5 to 4.0 (and then to 4.5)
When you open your app in VS2012, it will offer to migrate it to .NET 4.5.
Let it do the migration; most of the changes are in the web.config.
Refer to http://www.asp.net/whitepapers/aspnet4 and http://www.asp.net/vnext/overview/aspnet/whats-new for an overview of potential "breaking changes"
You may have javascript problems with ClientID; ClientIDMode=AutoID or static may help.
If you are using 3rd party .NET assemblies, some of them may not work properly.
You will have to check with the assembly author for new updates.
Good luck on the migration.

Debug SimpleMembershipProvider source

I went through this article (http://msdn.microsoft.com/en-us/library/cc667410.aspx) which shows how one can debug asp.net source code.
Now, I'm having some serious trouble using the new SimpleMembershipProvider in WebMatrix.WebData namespace, and I want to debug it, but I'm not able to. When I try to step into the WebSecurity.CreateAccount method, it just steps over the method call.
I'm using Visual Studio 2012 Ultimate. What am I missing?
Is WebMatrix.WebData a third party dll? If so, you might need to decompile it, get the source and then add the source to your solution. Otherwise I don't think you'll be able to set into it.

The type or namespace name 'IQueryable' could not be found

I have a weird issue. I have a VS 2010 .Net 4.0 Web Site (not web app) that runs on IIS 7.5.
When I build the site, I'm getting errors like the one in the title. Normally, this would be straightforward to fix - just add a reference.
In this case, I already have a reference to System.Core.Dll (4.0). I have "using System.Linq" declared.
If I fully quality my references to IQueryable (e.g. System.Linq.Iqueryable), autocomplete resolves it perfectly.
All my folders are read/write enabled.
I'm not sure what else to check.
Maybe one of my fellow Overflowers can help? :-)
TIA!
Ensure that the Target Framework is set to ".Net Framework 4" in the property pages
I found the error...it seems that there was an error in an upstream web.config that was causing my build to fail. I wish I knew why the symptoms manifested the way they did, but I'm building now. :-)
Thanks to all who answered and tried to help.

The operation could not be completed. Invalid FORMATETC structure

I am developing web based application using asp.net and ajax. Today I am facing an issue, while dragging and dropping the ajax based components under the ajax enabled webform.
The error message is
The operation could not be completed. Invalid FORMATETC structure
If your answer is assembly then please let me know which assembly such issues (be specific about assemblies)
It is basically due to Ajax Toolkit assembly if you have added it as toolbox. Only way to get rid of this is to restart your IDE , whenever your have Formatetc error , or unload the toolbox and recreate it. Either of them will solve the. But it will not go. Occurance will become rare. Hope this help.
Ajax toolkit version < 3.5 seen such bugs.
If you using AjaxControlToolkit.dll try remove it and redownload and adding again.
Also try re-install Ajax Control Toolkit, which might solve your problem.
first Check in control panel => administrative tool => .net framework . your internet priority is low then change it

Why is this code stopping? VB ASP.NET

Hey I am coding using Visual Studio 2003. My program worked fine until I introduced a dll I made using CreateObject.
Code:
Set docs2 = server.CreateObject("DocGetter.Form1")
docs2.GetDocument oXMLDom,numID
It appears to be getting stuck at this code. I've already used regasm to register the dll.
What else could be wrong?
Add a reference to the dll in your project and instantiate the object like this:
Dim docs2 As New DocGetter.Form1()
If that doesn't make sense, then fix it so it does. There's no good reason to use CreateObject in .Net code. (Okay, that's hyperbole. But the principal is sound).
Can you clarify - is this a web app or a client (winform) app? Form1 sounds like a winform. ASP.NET runs at the server, so showing a form would be inappropriate - it would happen at the server, not the client. In short, don't do this!
I also can't see where "stored procedures" figures in this, so I've removed the tag.
What are you trying to do? Options for showing something more complex at the client include:
dhtml
flash
silverlight
clickonce [requires windows client]
ocx [not recommended]
I'd bet money that this function isn't defined with this name and/or parameters.
docs2.GetDocument oXMLDom,numID
But because of the way you're instantiating the object, the compiler has no way of knowing this... I think.

Resources