|
Scaramouche posted:Is this an internal app or a public facing one? A lot of the "never use code behind" is because of speed concerns, AXD chicanery, etc. I don't really get the hate for it myself; I've built enterprise scale sites (e.g. 1 million uniques a day) that use code-behind and not really had a problem with it. There's some session management and program flow gotchas, but once you learn to work around them it's really not a big deal. I THINK public. It's basically a table that lets you search through ~1200 or so administrative orders, that is, Judge says "do this from now in in my court(house)." Basically it lets you search by date, name, book/page number (still no clue what that actually MEANS) and the user eventually gets directed to a pdf scan of the order. Not worried about speed, just doing it cleanly, maintainably, and in a manner that doesn't cause a week long headache to the next developer to look at it.
|
# ? Jul 31, 2014 23:18 |
|
|
# ? May 15, 2024 21:11 |
|
Is there a way to instantiate automatic properties without having to put it in the constructor itself? Or is ClassC (no automatic properties) the most graceful answer?C# code:
|
# ? Aug 1, 2014 17:20 |
|
You have to use ClassB (with initialization in the ctor) or ClassC. They do plan to add this to the language [source].
|
# ? Aug 1, 2014 17:32 |
|
Sedro posted:You have to use ClassB (with initialization in the ctor) or ClassC. quote:The initializer directly initializes the underlying field – it doesn’t go through the setter. For that reason, it is now meaningful to allow getter-only auto-properties: Yessss
|
# ? Aug 1, 2014 18:07 |
|
More of my low priority idle wishes need to come true like this.
|
# ? Aug 1, 2014 18:39 |
|
quote:The initializer directly initializes the underlying field – it doesn’t go through the setter. For that reason, it is now meaningful to allow getter-only auto-properties: This seems like a halfway solution to what I really want, which is true readonly (as in the access modifier) properties that are settable through the constructor, e.g.: C# code:
|
# ? Aug 1, 2014 20:04 |
|
Agreed. Immutable POCOs are still second-class.C# code:
C# code:
|
# ? Aug 1, 2014 21:13 |
|
Bognar posted:It seems that with their suggestion, to do this you'd still have to use a readonly backing field and getter-only manual property. It still doesn't cover all the bases, but for what it's worth they're also adding some new syntax for "primary constructors", so you'll be able to do stuff like this: C# code:
C# code:
|
# ? Aug 1, 2014 21:40 |
|
LOOK I AM A TURTLE posted:It still doesn't cover all the bases, but for what it's worth they're also adding some new syntax for "primary constructors", so you'll be able to do stuff like this: This is what I should have quoted.
|
# ? Aug 1, 2014 22:33 |
|
JSON and datatables saved my sanity. Sr Dev saw the light Our old lovely .net 2.0 custom gridview automagically did some CSS for us, so I get to poke around in that, but hey guess what isn't a huge pain in the rear end? <%eval()%> mixed up with onkeyup mixed with codebehind!
|
# ? Aug 2, 2014 04:32 |
|
Ender.uNF posted:Is there any way to get the ASP.Net precompiler to spit out the actual circular references when it gives you that idiotic circular reference error? I've got it setup to merge all output to a single assembly and there are no actual circular references, but the way it batch compiles each folder means if /sub1/A -> /sub2/B and /sub2/C -> /sub1/D then ASP.Net creates a circular reference out of thin air for you. Why it doesn't just compile the whole site as one batch in that mode I have no idea. FYI for anyone who cares: The awful pile of garbage that is McAfee strikes again! It turns out this entire issue was caused by the McAfee virus scanner rushing in and hijacking the files in the precompile temp directory in the middle of the precompile. Disabling McAfee (which is only temporary until the dump corporate ePolicy crap overwrites the changes) makes the problem disappear. Separately, our QE servers were also getting constant session timeouts due to app domain restarts (with nothing in the event log or on Process Monitor). Turns out after enabling detailed logging the app domain was restarting due to "config file or bin change" when no activity was visible on Process Monitor... in other words, the McAfee root kit hid the file activity but still triggered the file watcher to restart. That restart activity would trigger McAfee to scan again for whatever reason, putting everything in an eternal loop. McAfee installs 19 different drivers and services, including hidden boot-critical devices, it's own root kit of sorts, NDIS mini port filters, and more. It has to be the worst piece of garbage ever written. Our corporate policy also requires scanning on every single read and write for every single filetype. I am so happy to be getting out of this place.
|
# ? Aug 2, 2014 05:17 |
|
The new Identity stuff in MVC 5 is complex. Been trying all day to wrap my head around it and finally got it working. Owin and all the other stuff is totally new and the documentation doesn't make it any better. Now to write my own userstore and the like pffff.
|
# ? Aug 3, 2014 20:04 |
|
Mr Shiny Pants posted:The new Identity stuff in MVC 5 is complex. We attempted to use it for a recent project, but ultimately we threw it out and rolled our own like we have done for years. I wish MS would get away from trying to provide the "one identity solution to rule them all" and instead just provide sane defaults for password hashing, password requirements, and default functionality for email validation, password resets, and the like.
|
# ? Aug 4, 2014 01:10 |
|
Bognar posted:We attempted to use it for a recent project, but ultimately we threw it out and rolled our own like we have done for years. I wish MS would get away from trying to provide the "one identity solution to rule them all" and instead just provide sane defaults for password hashing, password requirements, and default functionality for email validation, password resets, and the like. Yeah I get what you mean, they are always trying to be all things to all men. See WPF, you can do almost anything with it but there are no "slick" standard controls a la OSX.
|
# ? Aug 4, 2014 05:02 |
|
Bognar posted:We attempted to use it for a recent project, but ultimately we threw it out and rolled our own like we have done for years. I wish MS would get away from trying to provide the "one identity solution to rule them all" and instead just provide sane defaults for password hashing, password requirements, and default functionality for email validation, password resets, and the like. I'm trying to learn MVC for a personal project and to expand my skillset in general, and this Identity poo poo is not making it easy, let me tell you. Mr Shiny Pants posted:Yeah I get what you mean, they are always trying to be all things to all men. See WPF, you can do almost anything with it but there are no "slick" standard controls a la OSX. Meanwhile, it provides a DatePicker but not a DateTimePicker, because why would you have a control that takes advantage of a built-in data type (DateTime) when you can have one that takes advantage of only half of it? I mean, nobody cares about time of day, right? Especially in a business environment. We got a meeting tomorrow guys. What time? Tomorrow. Something wrong with your ears?
|
# ? Aug 4, 2014 12:08 |
|
Bognar posted:We attempted to use it for a recent project, but ultimately we threw it out and rolled our own like we have done for years. I wish MS would get away from trying to provide the "one identity solution to rule them all" and instead just provide sane defaults for password hashing, password requirements, and default functionality for email validation, password resets, and the like. V1 is missing some obvious stuff but they added it in in V2. I haven't switched my work project over because we did our own versions of password resets and e-mail validation and now changing them would be a hassle but they're there in V2. Che Delilas posted:I'm trying to learn MVC for a personal project and to expand my skillset in general, and this Identity poo poo is not making it easy, let me tell you. What are you stuck on?
|
# ? Aug 4, 2014 12:46 |
|
What I found really annoying when first reading about it is that a lot of it is intertwined with Entity Framework without making it really clear what does what and why you'd need it. I have it working with Redis now Yay me!
|
# ? Aug 4, 2014 14:20 |
|
The identity stuff mostly works right out of the box for me.
|
# ? Aug 4, 2014 15:37 |
|
Che Delilas posted:I'm trying to learn MVC for a personal project and to expand my skillset in general, and this Identity poo poo is not making it easy, let me tell you. I'm not having that big of a problem with the new identity bits. In fact they make quite a bit more sense than fighting through the old identity providers. Especially on the custom implementation side. I'd generally argue that they leave a bit to be desired -- the API surface is basically designed around "what do we need to work with Active Directory? And what do we need to make *our* MSSQL-based provider work to look like active directory?" But I'd take identity over membership most days of the week. As for the datepicker our old rule when we used web forms was "any microsoft provided control beyond your very basic repeaters, text boxes, check boxes and the like is really for MS to have roadshows to sell that poo poo to managers." Most of them were useless beyond the demo case to be sure.
|
# ? Aug 4, 2014 16:11 |
|
Until you're disassembling WCF DLLs to figure out why ReliableSession arbitrarily faults channels under heavy CPU load, only to discover it services heartbeat timers from a shared IO thread pool with normal priority you have no right to talk about painful built in frameworks. Did you want to use binary over TCP with SSL? Well get ready to follow the blog post chain because that poo poo sure ain't documented! I could rant for hours about WCF.
|
# ? Aug 4, 2014 16:28 |
|
Hey everyone, I hope this is the right place for this. I've got an issue that I'm banging my head against. We've got a big project that's supposed to deploy this Tuesday and over the last two weeks, I've been getting the following message on our QA box. The biggest thing is that it seems like random sections will break. I can do a redeploy and the error may fix in a previously broken section, yet break in another one. Furthermore, I did a deploy on Thursday; Friday everything worked, then came in this morning and a section that was working on Friday, broke. quote:Could not load file or assembly 'System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) After enabling Fusion logging, I get the following Assembly Load Trace: quote:=== Pre-bind state information === I can't find any explicit calls in the project that is referencing the System.Web.Razor. I've tried several different solutions that I've came across, but none have seemed to work. The variable and seemingly random nature of the error is what is really bothering me. Anyone have any ideas? Thanks! Edited for more info: Using MVC4, IIS7.5
|
# ? Aug 4, 2014 16:43 |
|
So after getting the Identity stuff to work I am looking for some advice for building it out for my own webapplication. My users have some extra attributes like street, country etc. What would be my best option: 1. Extending the existing application user class with my own attributes. In effect having one user class in the whole of my application. 2. Create another table and link the application user (entity) to the username? I like option 1 but 2 is also doable. Mr Shiny Pants fucked around with this message at 17:09 on Aug 4, 2014 |
# ? Aug 4, 2014 17:03 |
|
In general my experience has been one is best left leaving the authentication bits as a functional black box and then keeping your app's data (like demographic / address info) in data stores tied to my app. We typically go so far as to keep that asp.net databases as a physically separate DB as we don't like schlepping user logins back to developers. That said, the new extensibility points in the Identity bits should make extending stuff to use a custom user with this info is much easier than what one had to do with the old membership providers. But I still don't like mixing the two myself.
|
# ? Aug 4, 2014 17:33 |
|
wwb posted:In general my experience has been one is best left leaving the authentication bits as a functional black box and then keeping your app's data (like demographic / address info) in data stores tied to my app. We typically go so far as to keep that asp.net databases as a physically separate DB as we don't like schlepping user logins back to developers. Yeah this is exactly why I asked it, the new stuff seems built for extending and it keeps everything nice and tidy. I am just not sold on it, on the other hand it is exactly how something like AD is structured.
|
# ? Aug 4, 2014 18:28 |
|
This Post Sucks posted:Hey everyone, I hope this is the right place for this. I've got an issue that I'm banging my head against. We've got a big project that's supposed to deploy this Tuesday and over the last two weeks, I've been getting the following message on our QA box. The biggest thing is that it seems like random sections will break. I can do a redeploy and the error may fix in a previously broken section, yet break in another one. Furthermore, I did a deploy on Thursday; Friday everything worked, then came in this morning and a section that was working on Friday, broke. This could be a lot of a lot of things. Is there a reference to Razor in your project (Solution > Project Name > References, you may have to hit the 'Show All Files' button)? And if so, is it valid? If it's not there, what happens if you add it? The second thing that springs to mind is can you find a reference to Razor in any of those machine.config, aspnet.config, or web.config?
|
# ? Aug 4, 2014 18:49 |
|
RICHUNCLEPENNYBAGS posted:What are you stuck on? Customizing it to suit my project's needs. I don't understand how all the pieces fit together, and so I don't know what to modify/add to enable things like role-based authorization and administrator approval of new registrants. I'm pretty sure it's a combination of information overload and inexperience with ASP.NET and web development in general. I'm not very familiar with what goes into authorization and authentication because all my previous experience in that area is "if they can install it with ClickOnce because they're in the right AD group, they're authorized to use it" corporate-style development. Trying to learn anything about it by examining Identity code is just confusing me.
|
# ? Aug 4, 2014 21:04 |
|
Scaramouche posted:This could be a lot of a lot of things. Is there a reference to Razor in your project (Solution > Project Name > References, you may have to hit the 'Show All Files' button)? And if so, is it valid? If it's not there, what happens if you add it? Everything looks valid and such on all the project references. Haven't found it referencing in any of the .config files, either. Will keep looking. Thanks!
|
# ? Aug 4, 2014 21:06 |
|
Before I go off writing my own C# bindings for Cairo, does anyone know of a half-decent way of generating EPS files in .NET?
|
# ? Aug 5, 2014 04:04 |
|
Che Delilas posted:Customizing it to suit my project's needs. I don't understand how all the pieces fit together, and so I don't know what to modify/add to enable things like role-based authorization and administrator approval of new registrants. Role-based authorization is just an attribute at either the controller or the action level like Authorize(Role = "Role1,Role2"). For provisioning, you can probably just use the UserManager class (I mean that's more complicated if you need to IMPLEMENT one, but not insurmountable). I've spent a fair amount of time with it and I'm sure other poeple here have too. wwb posted:In general my experience has been one is best left leaving the authentication bits as a functional black box and then keeping your app's data (like demographic / address info) in data stores tied to my app. We typically go so far as to keep that asp.net databases as a physically separate DB as we don't like schlepping user logins back to developers. There's no reason at all to avoid adding fields to your ApplicationUser class/subclassing it/whatever. Especially if you're using the EF Code First Identity and EF Code First in your application. Nothing to it. If it were me I'd make Address a class and give ApplicationUser an Address field. RICHUNCLEPENNYBAGS fucked around with this message at 04:42 on Aug 5, 2014 |
# ? Aug 5, 2014 04:38 |
|
RICHUNCLEPENNYBAGS posted:There's no reason at all to avoid adding fields to your ApplicationUser class/subclassing it/whatever. Especially if you're using the EF Code First Identity and EF Code First in your application. Nothing to it. I'll give it shot, I swore off EF though.
|
# ? Aug 5, 2014 05:27 |
|
Does anyone have or know of a .net wrapper for ghostscript, or some other free pdf library? I'm trying to render single pages to png using imageresizers' pdf renderer, but I've got some kind of wierd pdf that is causing it to fail, and I want to get to grips with what's causing my failure without going through the imageresizer pipeline.
|
# ? Aug 5, 2014 09:42 |
|
mortarr posted:Does anyone have or know of a .net wrapper for ghostscript, or some other free pdf library? https://www.nuget.org/packages/itextsharp/
|
# ? Aug 5, 2014 12:27 |
|
mortarr posted:Does anyone have or know of a .net wrapper for ghostscript, or some other free pdf library? GhostScript.NET: https://github.com/jhabjan/Ghostscript.NET
|
# ? Aug 5, 2014 13:38 |
|
RICHUNCLEPENNYBAGS posted:There's no reason at all to avoid adding fields to your ApplicationUser class/subclassing it/whatever. Especially if you're using the EF Code First Identity and EF Code First in your application. Nothing to it. Yeah, it is fun and easy and you probably won't have as retarded a data schema as one would by extending membership. It still don't make it right to mix authentication and application data though, keep them separate. Your future self will thank you for it.
|
# ? Aug 5, 2014 14:22 |
|
Bognar posted:GhostScript.NET: https://github.com/jhabjan/Ghostscript.NET gently caress me, 10 lines of code to fix what three days of loving around writing bindings for other pdf libraries and a call to the vendor couldn't. Thanks! code:
|
# ? Aug 5, 2014 23:43 |
|
Any WPF gurus want to take a crack at this? http://stackoverflow.com/questions/25165505/how-can-i-show-the-user-what-they-are-typing-into-an-iseditable-combobox The gist of it is: when the user types into an editable combobox, and a match is found, if the match is too long, the user can't see what they're typing. In this example gif above, typing "ABC" is fine, because it fits. Typing "PQR" selects the right item, but the user can't see what they're typing until they get further along in the string ("PQR-CONST...").
|
# ? Aug 6, 2014 17:42 |
|
epalm posted:Any WPF gurus want to take a crack at this? http://stackoverflow.com/questions/25165505/how-can-i-show-the-user-what-they-are-typing-into-an-iseditable-combobox Dropdown list with all the possibilities? Getting shorter while they are typing? The Google homepage does this, I think it is pretty elegant.
|
# ? Aug 6, 2014 17:53 |
|
Mr Shiny Pants posted:Dropdown list with all the possibilities? Getting shorter while they are typing? When I type into the google homepage, it bumps me up to the omnibar. I can still see what I'm typing even though there are longer options than the field is wide. Anyways I'm not looking to build my own omnibar from scratch.
|
# ? Aug 6, 2014 18:00 |
|
epalm posted:When I type into the google homepage, it bumps me up to the omnibar. I can still see what I'm typing even though there are longer options than the field is wide. It does not do that for me, maybe only in Chrome? I would show the dropdown and make it as wide as the widest option. Tab completion and the possibility to select an item is what I would do. How to build it in WPF? No clue, sorry.
|
# ? Aug 6, 2014 18:08 |
|
|
# ? May 15, 2024 21:11 |
|
This Post Sucks posted:Hey everyone, I hope this is the right place for this. I've got an issue that I'm banging my head against. We've got a big project that's supposed to deploy this Tuesday and over the last two weeks, I've been getting the following message on our QA box. The biggest thing is that it seems like random sections will break. I can do a redeploy and the error may fix in a previously broken section, yet break in another one. Furthermore, I did a deploy on Thursday; Friday everything worked, then came in this morning and a section that was working on Friday, broke. Are you referencing System.Web.Mvc from any projects that are NOT your actual MVC site? If so, that could be your culprit. Otherwise, given the Fusion log it could be a matter of needing to setup Assembly Bindings in the Web.configs for Mvc and/or Razor. My money is on a project other than an Mvc site containing a reference to System.Web.Mvc though.* * Because I very stupidly advised a coworker to do this as a shortcut and ended up fighting a nearly identical error for a day before realizing the blunder.
|
# ? Aug 6, 2014 19:46 |