Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
zerofunk
Apr 24, 2004
Thanks, I'll look into that on Monday. I didn't set all of this up initially, so I'm not really sure what's in the test settings. I've inherited a lot of decisions on this in terms of libraries/frameworks. Thankfully the project is still very new so it's not too difficult to shift directions on some things.

Adbot
ADBOT LOVES YOU

zerofunk
Apr 24, 2004
You can install IIS and have it use that instead. That's mostly what I use although I'm not sure what all the differences are.

zerofunk
Apr 24, 2004

Essential posted:

I'm not sure what size screen to get. Do any of you work on a 15" screen and feel it is sufficient? Or is 17" the way to go? What about graphics cards, do I need to get a dedicated one or is the built in one ok?

I have a Dell Precision with a 15" screen as my primary work machine. Used to have dual 20" monitors. I don't mind the loss of screen real estate too much, but I do have the upgraded 1920x1080 screen. I forget what my old monitors were...maybe 1680x1050? That helps a lot although it does make everything really small on a 15" screen. Doesn't bother me, but I know other people wouldn't like it. In my opinion a 17" is just way too big. I hate carrying around this thing when I have to (not very often thankfully). I can't imagine it being bigger.

As far as performance goes, I've been happy with it. It's about 3 years old now though, so it is starting to show its age a bit when it comes to VS2012 w/ ReSharper. Just make sure you have a SSD, regular old laptop hard drives suck. Although I imagine that's more standard these days.

zerofunk
Apr 24, 2004
If I remember right, he specifically says in the introduction (or somewhere early on) that he's not really trying to cover TDD in the book. It's just focusing on good unit testing practices. Can't remember if it had recommendations for material that covers TDD further and I don't have my copy available right now.

zerofunk
Apr 24, 2004

Chill Callahan posted:

Does anybody have a way to test if a remote private MSMQ exists that I have minimal permission to (usually just peek). This code BSODs machines if I try and run it. I've tried multiple machines and multiple remote queues.

Have you already tried just using MessageQueue.Exists()? I don't have much MSMQ experience, but everything I've done so far has used that to check for existence of a queue before creating it. Seems weird that you're a BSOD though.

zerofunk
Apr 24, 2004

Chill Callahan posted:

Unfortunately the MSDN documentation says that specifically doesn't work on remote private queues.

Ahh, sorry. Didn't check the documentation. I've only been working with local queues myself, so that hasn't been an issue. I can't even remember the last time I saw a BSOD. I might try testing that out tomorrow. I'll need to work with remote queues at some point soon although probably not private ones.

zerofunk
Apr 24, 2004
Never done it myself, but something like https://stripe.com/ is supposed to make this fairly easy (or at least easier?). It looks like they don't have an official .NET library, but there are some community ones linked. Looks like you can also just do everything straight through HTTP. I want to say there are a few other companies with similar offerings, but I don't remember the names now.

zerofunk
Apr 24, 2004
I like having it. It probably depends on your team, but I know that we would have people checking in poorly formatted code if StyleCop wasn't throwing up warnings that they knew had to be fixed. It sucks, but that's just how it is. They'll do it on another project where we're using old tools that have little in the way of support for enforcing things like that.

There are some things that are stupid, but you can change them. I definitely wouldn't want StyleCop to replace code reviews or vice versa though.

zerofunk
Apr 24, 2004

chippy posted:

- The site will need users to have a login, authenticated email address, profile, etc. Is the baked in stuff (ASP.NET Identity I think?) in the MVC framework good enough for this?
- Will EF be ok, or does it scale badly? Or are there things I can do to make it scale well? Or should I just gently caress it off and use Dapper?
- I might well make a companion mobile app as well - would the best way to do this be to provide a Web API controller to service the app? Or is that more suited to when you want to expose a public API?

I think you'll be fine with all three of those. Although I don't personally have experience with EF.

zerofunk
Apr 24, 2004
That's all fine, but once it's connected to a network, there's a possibility of someone else turning it into a tool to do things you never intended and don't want. It still has the capability of being a general purpose machine. As Ithaqua said, security patches are a big deal.

zerofunk
Apr 24, 2004
Yeah. I'm not 100% sure on the best way to go about it, but we do something like that. There is a common code solution and the projects in it get built as nuget packages. We host those on an internal repository. Right now we only have one other solution that actually uses those packages, but in theory there could be more.

You'll want to make sure the debugging symbols are exported as well, so that you can step through anything from the nuget package. I'm not sure if we're doing that strictly through nuget... I just know they're hosted on the same server as our internal repository. I could take a look tomorrow and figure that out though.

zerofunk
Apr 24, 2004

epalm posted:

That would be awesome, thanks. I'm randomly googling, and it seems like the opportunity and technology is there, but I'm not quite sure how to go about doing it.

So I of course can't find my notes from initially setting this up. It's not too bad though. Integrating it into your build process is probably the more difficult part.

For creating NuGet packages, I just used the documentation on the NuGet website. I will note that I did not have any success with the sections "From an assembly" or "From a project". I don't remember what went wrong, but I could not successfully create a package following those instructions. I was able to do so using the "From a convention based working directory". It's very possible I screwed up on something silly, but I figure it's worth pointing out. Initially we just had a directory with a nuspec file and a lib/net40 directory that would contain the DLLs. It looks like we now have a src directory as well. I'm assuming that's necessary for the debugging support - I'll touch on that later, but I didn't set it up so I'm not too knowledge there.
http://docs.nuget.org/create/creating-and-publishing-a-package

We use Jenkins to build this. Nothing special as far as building the project goes. I believe a batch file is then used to run a small application we wrote to increment the version in our nuspec file and then run the nuget command line application to create the package as described in the link above. It then copies the resulting nupkg file to the directory that our nuget package server uses to serve packages.

The package server isn't anything special. Again, I used the NuGet documentation as reference. Scroll down to the Creating Remote Feeds section.
https://docs.nuget.org/create/hosting-your-own-nuget-feeds

There is a NuGet.Server package that you can add to an empty web application project and then you have a NuGet package server. There's some configuration to do, but it's fairly simple from what I remember. Build and deploy on IIS, make sure that your build server can copy packages into its repository directory. All of the developers add that server as a source in Visual Studio and you should be good to go.

I think there are other NuGet servers out there. Pretty sure there was a commercial offering when I was looking into this. This has worked just fine for us so far though.

As for the debugging support, I did not set that part up myself. I know that the guy who did it used SymbolSource. We have that running on the same server that hosts our nuget repository. All of the developers setup Visual Studio per the instructions on the SymbolSource page.
http://www.symbolsource.org/Public/Home/VisualStudio

Hopefully that helps. If you have questions on anything specific, feel free to let me know.

zerofunk
Apr 24, 2004

Essential posted:

Do I just provide them a sample of how the request body should look or provide them a copy of the properties? How are they going to properly format into json the correct object? In this case they are using java, but of course a REST service shouldn't care what anyone who has access is using. I understand this is getting into documentation, but is a simple example of what the json object will look like sufficient?

The WebAPI Help Page nuget package makes it pretty easy to generate documentation. Whether or not the auto generated stuff is enough, probably just depends on the user and what they're expecting. You can of course customize it if necessary. I found it to be a good start when doing something similar for a client. Of course, said client never actually ended up using the API from what I understand. Go figure.

zerofunk
Apr 24, 2004

epalm posted:

How can I tell which resource is causing the permission problem?


I always default to running Process Monitor to look at what the process is trying to access when diagnosing things like this. Might be a better way that I'm not aware of, but that should tell you.

https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx

zerofunk
Apr 24, 2004
Yeah, sorry should have mentioned that you will absolutely want to use the filters. I tend to mostly just use the Process Name one myself. And make sure you click the Include button to actually add it before you click Ok.

zerofunk
Apr 24, 2004

epalm posted:

We are considering betting a non-trivial part of our business on MS Azure Web Apps. Is anyone currently using a serious competitor? I know AWS does Windows VMs, but I can't seem to locate a "web app" equivalent. I don't really want to keep dozens (hundreds?) of VMs up to date, nor do I really want to learn all the ins and outs of configuring and maintaining IIS, which makes Azure Web Apps appealing.

I have a couple small side projects using Azure Web Apps so I know my way around that stack/portal, which is why it's my go-to. Just doing my due diligence to research alternatives.

I haven't actually used either one, but I think AWS Elastic Beanstalk is similar.

zerofunk
Apr 24, 2004
I would lean toward adding another class to handle that.

Edit: Primarily because of the reason you mentioned - SRP. Also, adding the service as an additional dependency to your domain model, just complicates unit testing the domain model a little more. Sure you can mock it out on all of those tests, but it's easier if you don't have to.

zerofunk fucked around with this message at 12:09 on Nov 16, 2016

zerofunk
Apr 24, 2004
I thought I had read something about a new edition being in the works, but I can't seem to find anything now. With that said, I feel like there wasn't that much added in C# 6 that'd provide a lot of content to the book. I'm probably forgetting or shortchanging something though. Just seemed like a lot of the additions in C# 6 were fairly small syntax type things. Nothing on the scale of generics, async, etc that fills a lot of C# In Depth.

zerofunk
Apr 24, 2004

Careful Drums posted:

I had no idea that all connections to a SQL DB do an initial read from master. TIL. Thanks Goons

I may be wrong, but I'm not sure that's necessarily 100% true. SQL Server logins have a default database setting. That database is used when the connection is established. It doesn't have to be master, but that's the default.

zerofunk
Apr 24, 2004

redleader posted:

hangfire allows you to create queues, allowing you to process different background jobs on different hangfire servers

hangfire makes it sound like these queues work properly and predictably and as you'd expect

hangfire loving lies

I haven't looked at in a while, but from what I remember, somewhere in the documentation it gives the caveat that all your background tasks must be idempotent because they could be interrupted at any time and then it'll retry them. It seemed like that warning should have been a lot more prominent though as it is somewhat at odds with the marketing message of easily backgrounding all your tasks.

zerofunk
Apr 24, 2004
That would be my first approach too. Just delete the existing non-prod databases and then restore backups of the new ones in their place? Or you might be able to skip deletion and restore over them. I'm not sure if it's the best way to do it and it probably wouldn't work in all use cases. I am also not a DBA.

zerofunk
Apr 24, 2004

a hot gujju bhabhi posted:

Yeah I'd rather restore over them if possible but the backup/restore options don't show up in SSMS for those Azure hosted DBs. I think it's something to do with the fact that they're managed by Azure.

Ahh, yeah I haven't worked with Azure managed ones, so I'm not at all familiar with that. Might still be possible to do it somehow and just not through SSMS itself? Or if you have an older version of SSMS, newer ones might support it.

Adbot
ADBOT LOVES YOU

zerofunk
Apr 24, 2004

Hammerite posted:

Am I going mad or have they removed "trim trailing whitespace" from the latest version of visual studio? What a bizarre thing to get rid of

This has been driving me crazy lately because we have it setup so that causes a warning. I used to never have an issue with that and now I'm running into it all the time. I apparently will always add a space after a word even if the last one on that line out of habit. So if I'm writing a multi-line comment, it's guaranteed to have a few warnings that I have to go back and correct.

With VS2017, I had ReSharper setup, but I haven't been using it with VS2019. Kind of assumed that was the difference because there was a period during that transition where I wasn't doing a lot of development in VS, so I'm not really sure.

I also feel like I recently saw a setting for it in the VS options somewhere. I can't find it now though.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply