Search Results

Search found 18003 results on 721 pages for 'nidhinzz own'.

Page 86/721 | < Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >

  • How do you handle EF Data Contexts combined with asp.net custom membership/role providers

    - by KallDrexx
    I can't seem to get my head around how to implement a custom membership provider with Entity Framework data contexts into my asp.net MVC application. I understand how to create a custom membership/role provider by itself (using this as a reference). Here's my current setup: As of now I have a repository factory interface that allows different repository factories to be created (right now I only have a factory for EF repositories and and in memory repositories). The repository factory looks like this: public class EFRepositoryFactory : IRepositoryFactory { private EntitiesContainer _entitiesContext; /// <summary> /// Constructor that generates the necessary object contexts /// </summary> public EFRepositoryFactory() { _entitiesContext = new EntitiesContainer(); } /// <summary> /// Generates a new entity framework repository for the specified entity type /// </summary> /// <typeparam name="T">Type of entity to generate a repository for </typeparam> /// <returns>Returns an EFRepository</returns> public IRepository<T> GenerateRepository<T>() where T : class { return new EFRepository<T>(_entitiesContext); } } Controllers are passed an EF repository factory via castle Windsor. The controller then creates all the service/business layer objects it requires and passes in the repository factory into it. This means that all service objects are using the same EF data contexts and I do not have to worry about objects being used in more than one data context (which of course is not allowed and causes an exception). As of right now I am trying to decide how to generate my user and authorization service layers, and have run against a design roadblock. The User/Authization service will be a central class that handles the logic for logging in, changing user details, managing roles and determining what users have access to what. The problem is, using the current methodology the asp.net mvc controllers will initialize it's own EF repository factory via Windsor and the asp.net membership/role provider will have to initialize it's own EF repository factory. This means that each part of the site will then have it's own data context. This seems to mean that if asp.net authenticates a user, that user's object will be in the membership provider's data context and thus if I try to retrieve that user object in the service layer (say to change the user's name) I will get a duplication exception. I thought of making the repository factory class a singleton, but I don't see a way for that to work with castle Windsor. How do other people handle asp.net custom providers in a MVC (or any n-tier) architecture without having object duplication issues?

    Read the article

  • How to i disable the _moz_resizing?

    - by Shripad K
    I am using nicEdit editor and i have added my own custom image resizing script to it. But i want to disable the default _moz_resizing that appears in firefox. I wanted to have finer control over the image being resized. ( Eg: Allow only the image to resize and inherit the width of the parent container. ) So i wrote a custom script. But since firefox has its own image resizing control (_moz_resizing) how do i disable it? If there is no way to do so, i have a very simple workaround where i browser detect firefox and turn off my custom script and use the _moz_resizing instead. But i won't have fine grained control and will have to rely on there being now browser bugs in firefox. :(

    Read the article

  • NoSQL DB for .Net document-based database (ECM)

    - by Dane
    I'm halfway through coding a basic multi-tenant SaaS ECM solution. Each client has it's own instance of the database / datastore, but the .Net app is single instance. The documents are pretty much read only (i.e. an image archive of tiffs or PDFs) I've used MSSQL so far, but then started thinking this might be viable in a NoSQL DB (e.g. MongoDB, CouchDB). The basic premise is that it stores documents, each with their own particular indexes. Each tenant can have multiple document types. e.g. One tenant might have an invoice type, which has Customer ID, Invoice Number and Invoice Date. Another tenant might have an application form, which has Member Number, Application Number, Member Name, and Application Date. So far I've used the old method which Sharepoint (used?) to use, and created a document table which has int_field_1, int_field_2, date_field_1, date_field_2, etc. Then, I've got a "mapping" table which stores the customer specific index name, and the database field that will map to. I've avoided the key-value pair model in the DB due to volume of documents. This way, we can support multiple document types in the one table, and get reasonably high performance out of it, and allow for custom document type searches (i.e. user selects a document type, then they're presented with a list of search fields). However, a NoSQL DB might make this a lot simpler, as I don't need to worry about denormalizing the document. However, I've just got concerns about the rest of the data around a document. We store an "action history" against the document. This tracks views, whether someone emails the document from within the system, and other "future" functionality (e.g. faxing). We have control over the document load process, so we can manipulate the data however it needs to be to get it in the document store (e.g. assign unique IDs). Users will not be adding in their own documents, so we shouldn't need to worry about ACID compliance, as the documents are relatively static. So, my questions I guess : Is a NoSQL DB a good fit Is MongoDB the best for Asp.Net (I saw Raven and Velocity, but they're still kinda beta) Can I store a key for each document, and then store the action history in a MSSQL DB with this key? I don't need to do joins, it would be if a person clicks "View History" against a document. How would performance compare between the two (NoSQL DB vs denormalized "document" table) Volumes would be up to 200,000 new documents per month for a single tenant. My current scaling plan with the SQL DB involves moving the SQL DB into a cluster when certain thresholds are reached, and then reviewing partitioning and indexing structures.

    Read the article

  • Interfacing my application with existing authentication systems

    - by Karan Bhangui
    I'm writing a web based application that will have its own authorization/authentication mechanism (traditional cookie/session based user/pass). However, depending on the organization that licenses the software, I want them to be able to plug in their own existing internal authentication system as a way to replace mine. Ideally, they'd have to run as little code as possible on their end; I'm trying to make this a mostly hosted service. I'm aware of the existence of OAuth, but don't entirely understand how I would go about implementing the system at a higher level. Any tips would be appreciated.

    Read the article

  • How to get fan list of Facebook page or can overwite facebook social plugin css?

    - by Vaibhav Bhalke
    Hi, We are trying it with facebook social plugin. The HTML code for it as follow: <iframe border='0' src='http://www.facebook.com/plugins/likebox.php?id=1185611481&width=243&height=400&connections=15&stream=false&header=false' scrolling='yes' frameborder='0' allowTransparency='false' style='border:0px; overflow:hidden; width:243px; height:300px; background-color: #03869E; color: white;'> <iframe> As it replace inner HTML of frame on load. We want our own CSS to apply to this HTML. But as it replace whole HTML and it have its own CSS we are unable to set our CSS. We are doing this in GWT. Is there any way we can get the list of fans so we can display it as we want and can apply css? Or check given user is fan of page?

    Read the article

  • Separate log files for each web application and shared libraries with log4j

    - by oo_olo_oo
    I have few web applications run on the Tomcat server. Each application contains its own log4j library copy inside its own war. This allows for separate, flexible logging configuration per application. I also have few shared libraries (kept in Tomcat's shared libraries directory). I would like to have shared library loggers output among with the application (which uses them) loggers output (for example: if application A logs to file a.log, and uses library b.jar, I would like b.jar to log also to the a.log file). The problem is, that the shared libraries are loaded by the shared classloader, which causes that they can't access loggers defined by the applications. Is there any solution for this issue?

    Read the article

  • Transferring a flat file database to a MySQL database

    - by Jon
    I have a flat file database (yeah gross I know - the worst part is that it's 1.4GB), and I'm in the process of moving it to a MySQL database. The problem is that I'm not sure how to go about doing this - and I've checked through every related question on here but none relate to what I want to do, nor how my database is currently setup. My current flat file database is setup to where a normal MySQL row is its own file, and a MySQL table would be the directory. So for example if you have a user named Jon, there would be a file for the user in a directory named /members/. Within that file would be various information for the user including the users id, rank etc - all separated by tabs, all on separate lines (userid\t4). So here's an example user file: userid 4 notes staff notes: bla bla staff2 notes: bla bla bla username Example So how can I convert the above into their own rows and fields in MySQL? And if possible, could I do thousands of these files at once? Thanks.

    Read the article

  • Managing web.config for teams in VS2010 & TFS

    - by Jarrett
    With VS2010's mandate that web.config be included in the project, how do we allow everyone to keep their own custom config file without getting into source control problems? Previously, we would simply leave web.config out of our project, allowing everyone to keep their own local version of web.config on their machine. We moved to VS2010, and it is now forcing me to add web.config to my project in order to run debug mode. Because our project is linked to TFS, it automatically adds web.config to source control and tries to maintain it that way. Is there a way to run in debug mode without including web.config in your project? Or is there a better way to manage config files?

    Read the article

  • Faking a dynamic schema in Core Data?

    - by Gouldsc
    From reading the Apple Docs on Core Data, I've learned that you should not use Core Data when you need a dynamic schema. If I wanted to provide the user the ability to create their own properties, in a core data model would it work if I created some "dummy" attributes like "custom decimal 1", "custom decimal 2", "custom text 1", "custom text 2" etc that the user could name and use for their own purposes? Obviously this won't work for relationships, but for simple properties it seems like a reasonable workaround. Will creating a bunch of dummy attributes on my entities that go unused by most users noticeably decrease performance for them? Have any of you tried something like this? Thanks!

    Read the article

  • Adding js to a drupal node form

    - by googletorp
    In Drupal you can create your own nodetype in a custom module. Doing this you get to create your own form which is all very nice. However if you want to add js the form things get a bit more tricky. If you add the js in the form, the js will only be added form the form when it is loaded. If the user would post the form with validation errors, the form function is not run again and thus the js is not added. Normally you would just create a menu callback and add the js there, but for the node add form, this wont be a possible solution. So what is the best solution for adding js in a node add form, to keep it persistant when the form doesn't validate?

    Read the article

  • How to create a rounded title border in Java Swing

    - by Stephane Grenier
    I do understand that to create a title border, you do something like: BorderFactory.createTitledBorder(" Your Title "); However this creates a rectangle border whereas I need a rectangle with curved corners. Now from what I understand you can create your own custom border by: class CustomBorder implements Border { ... } The problem is that I'm not sure how to write the code that overrides the method: public void paintBorder(Component component, Graphics g, int x, int y, int width, int height) Or better yet, is there a way to do it without implementing your own Border class? And if not, how would you write that custom Title Border? I'm ok with drawing a rectangle with rounded corners, but how do you do it so that there's space for the label too?

    Read the article

  • How to fine tune a Membership Provider?

    - by Venemo
    After all the answers to my last question about fine-tuning turned out to be more useful than I expected, I thought that I would ask another similar Question about the MembershipProviders as well. Okay, so firstly, to clarify: I know what a Membership, Role, and Profile provider is, how to implement my own, and how to configure them, and most of the things about them. Implementing a role and profile provider is pretty straightforward, because they only require simple CRUD most of the time. (A single line of LINQ is enough for about half of the RoleProvider's methods.) However, the Membership provider is a differend beast. Many of you may realize that it violates the SR (Single Responsibility) principle, because it has to do EVERYTHING related to user management. While this leaves a lot of room for customizations, it has its downsides as well. There is no information on the Internet about what their EXACT expected behaviour is, such as when should they throw exceptions or simply return null, and stuff like that. I use this sample implementation for reference, but it also contains several contradictions. For example, it uses its own ValidateUser method for checking for credentials in the ChangePassword method. But the ValidateUser also updates the user's LastLoginDate to the current date. So, does the framework expect that I set it in my own provider as well, or is it simply a mistake in the sample? The other is: the ChangePassword method throws an exception every time when validating the new password, but CreateUser doesn't ever throw an exception, it simply returns false. And last, but not least: it counts the invalid password attempts of the user and locks them if it passes a threshold. While this is good, but it requires manual action to unlock the users. Is it a problem if my provider automatically unlocks the user after a certain amount of time? (EDIT) I almost forgot: the CreateUser method in the sample inserts the ID from the method parameter. I actually think this is bad practice, because I use inters with auto incement as IDs, so inserting them from some method parameter is not an option. Should I just ignore the parameter, or require that its value is null and throw an exception if it isn't? All in all, does ASP.NET have any assumptions about the behaviour of a MembershipProvider? Is there any documentation which describes when should I throw an exception or just return null? I also tried to find a set of generic unit tests which would provide some guidance about the expected behaviour, but no luck, I found plenty of articles about "Unit testing is good", and "How to unit test a MembershipProvider", but not one where there would be any actual tests. Thanks in advance for everyone!

    Read the article

  • PHP wrapper that is API-compatible with PDFlib.

    - by David Alan Hjelle
    Are there any wrappers to any of the other PDF generating packages for PHP that provide API compatibility with PDFlib? Our company has been generating PDFs from PHP using PDFlib for many years, but have not upgraded since version 5. Now that we are upgrading some servers, we need either upgrade or find a replacement. I'd like to replace PDFlib with an open-source product that allows commercial use. However, we (foolishly, perhaps) didn't write our own wrapper around PDFlib the first time around, and have many, many lines of code that would need to be changed and tested. I realize I could write my own wrapper, but I find it surprising that my searching thus far has yielded no-one else who has done the same.

    Read the article

  • C# int to byte[]

    - by Petoj
    If I need to convert an int to byte[] I could use Bitconvert.GetBytes(). But if I should follow this: An XDR signed integer is a 32-bit datum that encodes an integer in the range [-2147483648,2147483647]. The integer is represented in two's complement notation. The most and least significant bytes are 0 and 3, respectively. Integers are declared as follows: Taken from RFC1014 3.2. What method should I use then if there is no method to do this? How would it look like if you write your own? I don't understand the text 100% so I can't implement it on my own.

    Read the article

  • custom MSSQL driver

    - by hoodoos
    I had a crazy thought about writing my own MSSQL driver to make it work something like non-blocking http client, so it won't be thread thirsty and could handle lots of db queries within one thread. I tried to look over google for some guidelines about implementing MSSQL client protocol, but found none really, where do those guys get information about it when they write own implementations for PHP or python? I need a really low level to be documented so I can implement all phases of working with a connection through sockets. And would be really nice to have a an example in c# langauge. :)

    Read the article

  • how do i add two delegates to a ui element at run time?

    - by Michael Xu
    Hi everyone, im trying to implement some behaviors when a mapview element scrolls... by coding a delegate for the scrollview inside of a mapview. so, right now, i got a pointer to the scroll view used by the map view in my code. however, i wish to set the delegate of this scroll view inside the map view, but the issue is that the mapview already sets up a default delegate for this scroll view inside the map view. can i make my delegate implement all of the messages of the protocol, explicitly sending them to the mapview's default delegate while also implementing my own behaviors? how else can i go about adding my own delegate behavior, to an already existing default delegate....? thanks everyone, michael

    Read the article

  • What is a good dumbed-down, safe template system for PHP?

    - by Wilhelm
    (Summary: My users need to be able to edit the structure of their dynamically generated web pages without being able to do any damage.) Greetings, ladies and gentlemen. I am currently working on a service where customers from a specific demographic can create a specific type of web site and fill it with their own content. The system is written in PHP. Many of the users of this system wish to edit how their particular web site looks, or, more commonly, have a designer do it for them. Editing the CSS is fine and dandy, but sometimes that's not enough. Sometimes they want to shuffle the entire page structure around by editing the raw HTML of the dynamically created web pages. The templating system used by WordPress is, as far as I can see, perfect for my use. Except for one thing which is critically important. In addition to being able to edit how comments are displayed or where the menu goes, someone editing a template can have that template execute arbitrary PHP code. As the same codebase runs all these different sites, with all content in the same databse, allowing my users to run arbitrary code is clearly out of the question. So what I need, is a dumbed-down, idiot-proof templating system where my users can edit most of the page structure on their own, pulling in the dynamic sections wherever, without being able to even echo 1+1;. Observe the following psuedocode: <!DOCTYPE html> <title><!-- $title --></title> <!-- header() --> <!-- menu() --> <div>Some random custom crap added by the user.</div> <!-- page_content() --> That's the degree of power I'd like to grant my users. They don't need to do their own loops or calculations or anything. Just include my variables and functions and leave the rest to me. I'm sure I'm not the only person on the planet that needs something like this. Do you know of any ready-made templating systems I could use? Thanks in advance for your reply.

    Read the article

  • Gradle java.util.logging.Logger output in unit tests

    - by Misha Koshelev
    Dear All: Sorry this is probably a very simple question. I am using gradle http://www.gradle.org/ for my development environment. It works quite well! I have written a simple unit test that uses HtmlUnit and my own package. For my own package, I use java.util.Logger. HtmlUnit seems to use commons logging: http://htmlunit.sourceforge.net/logging.html I would like to see console output of my logging messages from java.util.Logger However, it seems that even messages at the info level are not displayed in my Unit Test Results GUI (System.err link), although the HtmlUnit messages are all displayed. Please let me know if you have suggestions. Thank you! Misha

    Read the article

  • Standard Place for an Empty String Array in the JDK

    - by Simon B
    Hi is there a standard place for accessing empty array constants in the JDK 1.5. When I want to do a conversion from a String Collection (e.g. ArrayList)to a String Array I find myself using my own which is defined in my own Constants class: public static final String[] EMPTY_STRING_ARRAY = new String[0]; And then in my client code something like: String[] retVal = myStringList.toArray(Constants.EMPTY_STRING_ARRAY); return retVal; I was wondering if this is the "idiomatic" of doing it or if I'm missing something I get the impression from the brief search I did that this kind of thing is prevalent in many people's code. Any ideas, answers, comment (aside from that I shouldn't really use String Arrays) greatly appreciated, Cheers Simon

    Read the article

  • XML/XHTML replace content?

    - by Daveo
    I have a XHTML string I want to replace tags in for example <span tag="x">FOO</span> <span tag="y"> <b>bar</b> some random text <span>another span</span> </span> I want to be able to find tag="x" and replace FOO with my own content and find tag=y and replace all the inner content with by own content. What is the best way to do this? I am thinking regex is definitely out of the question. Can XPATH do this or is that just for searching can it do manipulation?

    Read the article

  • Efficiently making web pages from multiple servers

    - by james.bcn
    I want to create a service that allows diverse web site owners to integrate material from my web servers into content served from their own servers. Ideally the resulting web page would only be delivered from the web site owners server, and the included content would be viewed as being part of the site by Google - which I think would rule out iframes or client-side Javascript to get the content from my server (although I may be wrong about that?). Also the data wouldn't actually be updated that often, say once a day, so it would be inefficient to get the data from my web servers with every request. Finally, the method needs to be as simple as possible so that it is easy for web site owners to integrate into their own sites. Are there any good methods for doing this sort of thing? If not then I guess the simple way is with iframes or Javascript.

    Read the article

  • Address Book callback not called

    - by Oliver
    I have an iPhone app that makes use of the AddressBook.framework and uses Core Data to store these contacts. In order to make sure I update my own database when the Address Book is updated (whether via MobileMe or editing within my own app), I am subscribing to the notification as to when the Address Book is updating. I call this on startup: ABAddressBookRef book = ABAddressBookCreate(); ABAddressBookRegisterExternalChangeCallback(book, addressBookChanged, self); Which (supposedly) calls this on any editing. I have an ABPersonViewController which allows editing, and addressBookChanged never seems to get called. void addressBookChanged(ABAddressBookRef reference, CFDictionaryRef dictionary, void *context) { // The contacts controller we need to call ContactsController *contacts = (ContactsController *)context; // Sync with the Address Book [contacts synchronizeWithAddressBook:reference]; } Is there any reason for it to not be called?

    Read the article

  • Work in Company vs paid add-ons for Visual Studio

    - by netmajor
    Hey, I'm yesterday install free(I'm student :D) DevExpress Refactor Tool for Visual Studio and think that is great stuff but... how looks using that add-ons in work place ? can You install it on Your own in Your pc?Employer agree with it ? it is difference that it's free or paid add-on ? did Your employer give You add-in from start ? (So You don't need to paid it Yourself?:D) Do You have Favorite add-in? ;) p.s. Do You know how to disable VS shortcut[Alt+Right] for feature? I want to use Refactor shortcut for CamelCaseRight but VS disable it for own shortcut :(

    Read the article

< Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >