Invalid Login attempts in Lightswitch 2012 and requiresQuestionAndAnswer - asp.net-membership

In my Lightswitch 2012 app if I provide the incorrect password 5 times it locks me out with "Maximum sign in attempts have been exceeded".
I have this default membership configuration in my web.config:
<add name="AspNetMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="_IntrinsicData" applicationName="BMS" requiresUniqueEmail="false" **requiresQuestionAndAnswer="false"** />
According to MSDN this should not happen: "If the RequiresQuestionAndAnswer property is set to false, invalid password-answer attempts are not tracked."
I have this set to False... the only way I can turn off InvalidPasswordAttempt tracking is to add a ridiculously high maxInvalidPasswordAttempts="100000" (which works but seems hacky). Is this the correct approach?

Hmm, I've not had that experience myself (but I've never tried getting the password wrong 5 times), so I can't say if that's the correct way to handle it, but it's unlikely. As you say, it seems quite a "hack" to have to do that.
If LS is ignoring the RequiresQuestionAndAnswer property then I'd consider that a bug. However there may be a reason for it. You could log a bug on the LS Connect website, & see what the response is there. Or you could ask the question in the Visual Studio LightSwitch - General Questions forum (I don't know if the team monitors questions here, but I know they're active in the LS forum).

Related

(Debug) Error In Xamarin App Development (Visual Studio)

The Basics
So I've been working with Xamarin a decent bit recently, and am looking for a solution to a current problem. I've been using the WoWonder script recently, and launched it on a site. i can confirm that the site is working well, without any hiccups. Although I've reworked some of the UI / UX, and basic functionality, I haven't delved extremely deep into it.
I'm currently using the Mobile Timeline applications to link into the network. I've had to debug a decent amount of problems so far with the NuGet packages, syntax errors, as well as authentication / decryption errors. I solved the first two, and solved the last by switching the SSL & TLS options in the Android Options area.
I would normally seek help from the author of said project, but given people in the comments haven't always gotten their answers, and instead got the runaround (Not to mention the broken english), I thought Stack would be the better option.
So far, I've asked around, and looked around, but haven't found anything. This is my last attempt before I start breaking everything down, line-by-line. I haven't found anyone else having a similar problem, other than the Xamarin > WP8 issue.
The Problem
Screenshots:
https://1drv.ms/u/s!Aub_kvZQCqk8ii7fW8ntcn4dxh-W
https://1drv.ms/u/s!Aub_kvZQCqk8ii9Ksd86tPIHLXMo
SideNote: The project does use 'Xamarin Components," and the syntax / order of things is a mess. It's nothing that breaks anything or issues too many warnings, it just parses a lot that it can't find, or isn't relevant / needed / is outdated.
Edit:
It's difficult to copy the context of the error in the emulator, since it doesn't seem to be showing up in visual studio. I'll transcribe it below.
Code Snippet:
System.Net.HttpRequestException: 500 (Internal Server Error) at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()[0x0002a] in <dcbf7ae3bce147228fa58d5bc31257ae>:0 at WowonderPhone.MainPage+<OnLoginClicked>d_2.MoveNext()[0x00252] in <1284583bda884ff38ca175979b310f47>:0
This has since been fixed. It was a problem on the server side, but had to do with the script, as the person previously mentioned. It wasn't a problem with Apache directives, or heightened security, just an inconsistency in the script syntax. Unfortunately, since another person solved this directly, I don't know the exact margin of error.

Why is SharePoint 2013 incredibly slow to load after setting enableSessionState to true?

We are migrating various solutions (some all SharePoint, some built with .NET) from SharePoint 2007 to 2013. It has been challenging to say the least. However, today a .NET application needed enableSessionState set to true. We already have session working (on a SQL Server, we have multiple WFE) and everything has been going fine. However, after setting the value to true, the entire site, almost every application, slowed to a crawl and basically became non-functional. Has anyone out there heard of something like this happening? If so, what was the resolution?
Also, I've been looking, but I cannot find exactly what happens to the system when that particular value is set to true. I know that pages can access session as a result, but what happens to the site/SharePoint when you set the value to true and save the web.config?

Browser Link always asking for "Do you want to stop debugging"

Just wondering my browser keeps asking if I want to stop debugging every time I hit browser link refresh very annoying as is slowing down devtime.
Has anybody else come across this?
cheers
Updated Answer, Root Cause Now Found
After what is now TWO years of seeing this error on and off I finally understand what's causing this. A BIG Thank you goes out to Damian Edwards for mentioning this in a community stand-up!
As a developer, we often do all of our development in Visual Studio in Debug mode rather than release mode. And it's very common for us to run our projects with F5. In this case VS runs the project with the debugger enabled, no surprise there.
So it turns out, the "Do you want to stop debugging? error dialog when you try to refresh via browserlink is saying is "Hey you made some changes that look like they might require recompiling the razor view in order to refresh the page, and in order to do that Visual Studio needs to stop the debugger session, is that OK?"
And the fix? This is gonna blow your mind. When you want to use browser link to rapidly refresh the page while doing html/css changes and never see this message again, do this: run the project using CTL+F5 instead of F5. This will run the project without firing up the debugger and you probably weren't gonna use the debugger anyway if you were planning on doing a bunch of html css work on a view using browerlink. :-) That's it, no more error message. Bam. You're welcome. (It took me T W O Y E A R S to figure that out. Hand against forehead, eyes rolling)
I have left my original answer below because it did seem to help in some cases and it has already received a couple upvotes, but in hind sight, I think it was more of a coincidental observation than a root cause..
Original
I have been struggling with this issue for nearly a year. I may have just discovered the cause. I was running two copies of visual studio, each with different web projects, at the same time. Then when I try to get browserlink to refresh the browser in one copy of visual studio it asks “Do you want to stop debugging”.
I then quit out of the 2nd copy of visual studio, and re-ran the web project in the first copy of visual studio and when I tried to get browserlink to refresh the browser it worked fine with no prompt. Yea. A better error message than “Do you want to stop debugging” might have been "It looks like you are running two web projects at the same time in different copies of visual studio. Browserlink does no support this, please close one of them."
You may want to check out this post: https://stackoverflow.com/a/21706524/4079626. If you are using an older version of IE (like IE9), then long-polling may be the issue.
Short answer
Browser Link will only use WebSockets on Windows 8 or Windows Server
2012
Longer answer
The following would explain the issue if you're using Visual Studio on
Windows 7, Windows Vista or Windows Server 2008:
IIS (Express) depends on the .NET framework implementation in
System.Net.WebSockets to handle WebSocket connections; as you
can read in the link to MSDN, you simply don't get an actual
implementation of the necessary classes when you install .NET 4.5 on
Windows 7.
So in that case, the server can't agree to the client's request to
change from standard HTTP to the WebSocket protocol, which forces the
SignalR client to use one of the fallback options (in your case:
long-polling).

What are the problems and their solutions when working off-line with TFS?

Since the connection with the TFS server at my office is not stable, I often work with the codes in offline mode (here's how to work offline quickly).
The regular problem I get after the system goes online is the merging step which makes me stumble around the codes to get the codes online. I don't understand why the same problem doesn't happen when I work online from the beginning!
So, my question is what are the problems when working offline with TFS? And their solutions/notices to get back to online codes?
If you want to insure that you will not have to merge, you can check out a file or files with the lock option. This does not allow anyone to either check in or check-out on that particular file while you have it locked.
Understand that this could hamper productivity with fellow workers if they need to edit that same file.
Documentation is here.

MS Team Foundation Server in distributed environments - hints tips tricks needed

Is anyone out there using Team Foundation Server within a team that is geographically distributed? We're in the UK, trying work with a team in Australia and we're finding it quite tough.
Our main two issues are:
Things are being checked out to us without us asking on a get latest.
Even when using a proxy, most thing take a while to happen.
Lots of really annoying little things like this are hardening our arteries, stopping us from delivering code and is frankly creating a user experience akin to pushing golden syrup up a sand dune.
Is anyone out there actually using TFS in this manner, on a daily basis with (relative) success?
If so, do you have any hints, tips, tricks or gotchas that would be worth knowing?
P.S. Upgrading to CruiseControl.NET is not an option.
Definitely upgrade to TFS 2008 and Visual Studio 2008, as it is the "v2" version of Team System in every way. Fixes lots of small and medium sized problems.
As for "things being randomly checked out" this is almost always due to Visual Studio deciding to edit files on your behalf. Try getting latest from the Team Explorer, with nothing open in Visual Studio, and see if that behavior persists. I bet it won't!
Multiple TFS servers is a bad idea. Make sure your proxy is configured correctly, as it caches repeated GETs. That said, TFS is a server connected model, so it'll always be a bit slower than true "offline" source control systems.
Also, if you could edit your question to contain more specific complaints or details, that would help -- right now it's awfully vague, so I can't answer very well.
We use TFS with a somewhat distributed team - they aren't too far away but connect via a slow and unreliable VPN.
For your first issue, get latest on checkout is not the default behaviour. (Here's an explanation) There is an add-in that will do it for you, though.
Here's the workflow that works for us:
Get latest
Build and verify nothing's broken
Work (changes pended)
Get latest again
Deal with merge conflicts
Build and verify nothing's broken
Check in
[edit] OK looks like you rephrased this part of the question. Yes, Jeff's right, VS decides to check some files out "for you," like sln and proj files. It also automatically checks out any source file that you edit (that's what you want though, right? although you can change that setting in tools > options > source control)
The proxy apparently takes a while to get ramped up (we don't use it) but once it has cached most of the tree it's supposed to be pretty quick. Can you do some monitoring and find the bottleneck(s)?
Anything else giving you trouble, other than get-latest-on-checkout and speed?
From my understanding you can have multiple TFS Application servers in different locations. They either can both talk to the same SQL Server or you could use SQL Server mirroring. Having your own local TFS server would likely speed up your development times.

Resources