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
Fuck them
Jan 21, 2011

and their bullshit
:yotj:

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.

Adbot
ADBOT LOVES YOU

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
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:
class ClassA
{
 public SomeDataClass data = new SomeDataClass();
 public ClassA(){} // data is not null
}

class ClassB
{
 public SomeDataClass data { get; set; }
 public ClassB(){} // data is null
}

class ClassC
{
 private SomeDataClass _data = new SomeDataClass();
 public SomeDataClass data { get{return _data;} set{_data = value;} }
 public ClassC(){} // data is not null
}

Sedro
Dec 31, 2008
You have to use ClassB (with initialization in the ctor) or ClassC.

They do plan to add this to the language [source].

raminasi
Jan 25, 2005

a last drink with no ice

Sedro posted:

You have to use ClassB (with initialization in the ctor) or ClassC.

They do plan to add this to the language [source].

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 :getin:

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
More of my low priority idle wishes need to come true like this.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

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:

public int Y { get; } = y;

For getter-only auto-properties, we would generated the backing field as readonly.

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:
public class A
{
    public int Y { get; readonly set; }
    // OR
    public readonly int Y { get; }

    public A(int y)
    {
        Y = y;
    }
}
It seems that with their suggestion, to do this you'd still have to use a readonly backing field and getter-only manual property.

Sedro
Dec 31, 2008
Agreed. Immutable POCOs are still second-class.
C# code:
// Mutable
public class A
{
    public int X { get; set; }
    public string Y { get; set; }
}
new A { X = 123, Y = "foobar" };

// Immutable
public class A
{
    readonly int x;
    readonly string y;

    public A(int x, string y)
    {
        this.x = x;
        this.y = y;
    }

    public int X { get { return x; } }
    public string Y { get { return y; } }
}
new A(x: 123, y: "foobar");
Ideally we could use the initializer syntax with immutable objects too
C# code:
class A
{
    int X { get; readonly set; }
    string Y { get; readonly set; }
}
var a = new A { X = 123, Y = "foobar" };
a.X = 456; // error

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

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:
public struct Point(int x, int y)
{
	public int X { get; } = x;
	public int Y { get; } = y;
}
Which is equivalent to this in C#5 (not sure if this is 100% the same, but hopefully it's close enough):

C# code:
public struct Point
{
	private readonly int x;
	private readonly int y;

	public Point(int x, int y)
	{
		this.x = x;
		this.y = y;
	}

	public Point() { }

	public int X { get { return this.x; } }
	public int Y { get { return this.y; } }
}
By the way, these things are no longer just suggestions but have in fact already been implemented in Roslyn. You can see the status of these and other features on the Roslyn Codeplex site: https://roslyn.codeplex.com/wikipage?title=Language%20Feature%20Status&referringTitle=Documentation

raminasi
Jan 25, 2005

a last drink with no ice

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:

C# code:
public struct Point(int x, int y)
{
	public int X { get; } = x;
	public int Y { get; } = y;
}

This is what I should have quoted.

Fuck them
Jan 21, 2011

and their bullshit
:yotj:
JSON and datatables saved my sanity. Sr Dev saw the light :woop:

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!

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

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.

The error message is extremely helpful by choking on a completely unrelated ASCX control (or anywhere really) the next time it happens to need to resolve something in /sub1/ or /sub2/ in my example, so you get no help whatsoever in locating the actual problem.


I can't see how anyone at Microsoft is maintaining any of this stuff because the VS compilation process, publish without precompile, and the precompile all have extremely different ideas about what "compilation" actually means. The site itself runs just fine... perfectly in fact with zero errors. You just can't do a packaged installer build thanks to the fake circular reference helpfully created for me by ASP.Net


Doing it by hand means examining the markup for a couple hundred ASPX and ASCX files, looking at what pages/controls they register, noting what folders everything lives in, then resolving down the folder differences to find the two pairs causing the "circular" reference. We're about to give up and just tell it to generate one assembly per page/control, even though that takes a 5 minute build to like an hour, or just dump all the user controls in one huge directory.

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. :v:

I am so happy to be getting out of this place.

Mr Shiny Pants
Nov 12, 2012
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.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

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.

Mr Shiny Pants
Nov 12, 2012

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.

Che Delilas
Nov 23, 2009
FREE TIBET WEED

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?

RICHUNCLEPENNYBAGS
Dec 21, 2010

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?

Mr Shiny Pants
Nov 12, 2012
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 :D Yay me!

Dietrich
Sep 11, 2001

The identity stuff mostly works right out of the box for me.

wwb
Aug 17, 2004

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.


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?

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.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
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.

This Post Sucks
Dec 27, 2004

It Gave Me Splinters!
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 ===
LOG: DisplayName = System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Webs/DefaultWeb/XXXX/
LOG: Initial PrivatePath = C:\Webs\DefaultWeb\XXXX\bin
Calling assembly : System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Webs\DefaultWeb\XXXX\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/49584911/2bb97c71/System.Web.Razor.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

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

Mr Shiny Pants
Nov 12, 2012
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

wwb
Aug 17, 2004

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.

Mr Shiny Pants
Nov 12, 2012

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.

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.

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.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

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.


After enabling Fusion logging, I get the following Assembly Load Trace:


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

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?

Che Delilas
Nov 23, 2009
FREE TIBET WEED

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.

This Post Sucks
Dec 27, 2004

It Gave Me Splinters!

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?

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?

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!

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
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?

RICHUNCLEPENNYBAGS
Dec 21, 2010

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.

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.

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.

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.

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

Mr Shiny Pants
Nov 12, 2012

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.

If it were me I'd make Address a class and give ApplicationUser an Address field.

I'll give it shot, I swore off EF though.

mortarr
Apr 28, 2005

frozen meat at high speed
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.

Adahn the nameless
Jul 12, 2006

mortarr posted:

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.

https://www.nuget.org/packages/itextsharp/

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

mortarr posted:

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.

GhostScript.NET: https://github.com/jhabjan/Ghostscript.NET

wwb
Aug 17, 2004

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.

If it were me I'd make Address a class and give ApplicationUser an Address field.

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.

mortarr
Apr 28, 2005

frozen meat at high speed

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:
private static Bitmap Decode(Stream s, string page)
{
  const int Dpi = 96;

  using (var rasterizer = new GhostscriptRasterizer())
  {
    rasterizer.Open(s);
        
    var img = rasterizer.GetPage(Dpi, Dpi, int.Parse(page));

    return new Bitmap(img);
  }      
}

epswing
Nov 4, 2003

Soiled Meat
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...").

Mr Shiny Pants
Nov 12, 2012

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



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...").

Dropdown list with all the possibilities? Getting shorter while they are typing?

The Google homepage does this, I think it is pretty elegant.

epswing
Nov 4, 2003

Soiled Meat

Mr Shiny Pants posted:

Dropdown list with all the possibilities? Getting shorter while they are typing?

The Google homepage does this, I think it is pretty elegant.

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.

Mr Shiny Pants
Nov 12, 2012

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.



Anyways I'm not looking to build my own omnibar from scratch.

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.

Adbot
ADBOT LOVES YOU

Dr. Poz
Sep 8, 2003

Dr. Poz just diagnosed you with a serious case of being a pussy. Now get back out there and hit them till you can't remember your kid's name.

Pillbug

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.


After enabling Fusion logging, I get the following Assembly Load Trace:


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

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.

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