Daily Archives

Articles indexed Saturday May 22 2010

Page 1/81 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Elmah for non-HTTP protocol applications OR Elmah without HttpContext

    - by Josh
    We are working on a 3-tier application, and we've been allowed to use the latest and greatest (MVC2, IIS7.5, WCF, SQL2k8, etc). The application tier is exposed to the various web applications by WCF services. Since we control both the service and client side, we've decided to use net.tcp bindings for their performance advantage over HTTP. We would like to use ELMAH for the error logging, both on the web apps and services. Here's my question. There's lots of information about using ELMAH with WCF, but it is all for HTTP bindings. Does anyone know if/how you can use ELMAH with WCF services exposing non-HTTP endpoints? My guess is no, because ELMAH wants the HttpContext, which requires the AspNetCompatibilityEnabled flag to be true in the web.config. From MSDN: IIS 7.0 and WAS allows WCF services to communicate over protocols other than HTTP. However, WCF services running in applications that have enabled ASP.NET compatibility mode are not permitted to expose non-HTTP endpoints. Such a configuration generates an activation exception when the service receives its first message. If it is true that you cannot use ELMAH with WCF services having non-HTTP endpoints, then the follow-up question is: Can we use ELMAH in such a way that doesn't need HttpContext? Or more generally (so as not to commit the thin metal ruler error), is there ANY way to use ELMAH with WCF services having non-HTTP endpoints?

    Read the article

  • Best way to display a list of events by month

    - by EmmyS
    I have a mySQL table of events and want to display them in a list using PHP. Pretty simple, except I only want to display the month name once, for example: May 2010 12th, 7 pm. Event 1 - event one description 15th, 5:30 pm. Event 2 - event two description June 2010 9th, 7 pm. Event 1 - event one description 11th, 5:30 pm. Event 2 - event two description I'm very new at SQL and PHP. I can think of one way to do it. It would involve selecting all records grouped by date, then looping through all records, comparing the month/year value each time and the first time the month/year doesn't match, print a new header row to my HTML table. I can't believe it's the best or most efficient way to go. Any ideas for a newbie? I'm sure my way would work, but it's inelegant at best, and processor-intensive at worst.

    Read the article

  • printing from crystal reports activex printcontrol gives needless error

    - by DaVinciCoder
    I've got an asp.net application running on a windows 2008 64 bit server that gives an error after printing a crystal report. The server has CR 2008 runtime sp2 installed and views fine. When printing from the print button of the CR viewer the print dialog appears and prints correctly but throws the following error message after printing. "An error occurred on the server. Printing will be stopped. Would you like to view the error information" there is a yes or no option that points to an empty html file called PrintControlError.html. Other then this issue I've got no other troubles.

    Read the article

  • Architecture for a business objects / database access layer

    - by gregmac
    For various reasons, we are writing a new business objects/data storage library. One of the requirements of this layer is to separate the logic of the business rules, and the actual data storage layer. It is possible to have multiple data storage layers that implement access to the same object - for example, a main "database" data storage source that implements most objects, and another "ldap" source that implements a User object. In this scenario, User can optionally come from an LDAP source, perhaps with slightly different functionality (eg, not possible to save/update the User object), but otherwise it is used by the application the same way. Another data storage type might be a web service, or an external database. There are two main ways we are looking at implementing this, and me and a co-worker disagree on a fundamental level which is correct. I'd like some advice on which one is the best to use. I'll try to keep my descriptions of each as neutral as possible, as I'm looking for some objective view points here. Business objects are base classes, and data storage objects inherit business objects. Client code deals with data storage objects. In this case, common business rules are inherited by each data storage object, and it is the data storage objects that are directly used by the client code. This has the implication that client code determines which data storage method to use for a given object, because it has to explicitly declare an instance to that type of object. Client code needs to explicitly know connection information for each data storage type it is using. If a data storage layer implements different functionality for a given object, client code explicitly knows about it at compile time because the object looks different. If the data storage method is changed, client code has to be updated. Business objects encapsulate data storage objects. In this case, business objects are directly used by client application. Client application passes along base connection information to business layer. Decision about which data storage method a given object uses is made by business object code. Connection information would be a chunk of data taken from a config file (client app does not really know/care about details of it), which may be a single connection string for a database, or several pieces connection strings for various data storage types. Additional data storage connection types could also be read from another spot - eg, a configuration table in a database that specifies URLs to various web services. The benefit here is that if a new data storage method is added to an existing object, a configuration setting can be set at runtime to determine which method to use, and it is completely transparent to the client applications. Client apps do not need to be modified if data storage method for a given object changes. Business objects are base classes, data source objects inherit from business objects. Client code deals primarily with base classes. This is similar to the first method, but client code declares variables of the base business object types, and Load()/Create()/etc static methods on the business objects return the appropriate data source-typed objects. The architecture of this solution is similar to the first method, but the main difference is the decision about which data storage object to use for a given business object is made by the business layer, not the client code. I know there are already existing ORM libraries that provide some of this functionality, but please discount those for now (there is the possibility that a data storage layer is implemented with one of these ORM libraries) - also note I'm deliberately not telling you what language is being used here, other than that it is strongly typed. I'm looking for some general advice here on which method is better to use (or feel free to suggest something else), and why.

    Read the article

  • Can VLC stream a YouTube video?

    - by pcampbell
    Is it possible to stream a particular YouTube video's content with VLC? The scenario is that you could paste a YouTube URL into a VLC dialog, and then have VLC stream the video as if it were a local media file. Any existing features in VLC, or workarounds that you know of to accomplish this streaming idea?

    Read the article

  • jQuery's getScript and the local file system-- limitations/alternatives?

    - by user210099
    Right now I'm working on a help-system which is based on a local file system. It is intended to be shipped with a product which is not used on internet-enabled machines, so it must be a stand alone webpage, without any dependencies on a web server. This introduces a few challenges. Namely, the directory structure that the files exist in require navigating "up and over" to access some .js files which are required to display the help system. This use to be implemented using the jQuery getScript function, but I have ran into some problems using this on the local file system. At first glance, it seemed that if my webpage was being served out of the C:/dev/webpage/html/ directory, and the files I needed were in C:/dev/webpage/js/(topic)/file.js, I could just build an absolute path (file:///...) and pass that into the getScript function. However, after testing this, it does not seem that the getScript function will let me go up a level from the html directory (where the html file is located which has the main code for the webpage). Unfortunately, I can not change the directory structure, nor can I change the .js file structure/format. Is there an alternative for loading/executing javascript files that are in a file structure where I need to go "up and over"? Thanks,

    Read the article

  • How do you build a Windows Workflow Project with NAnt 0.90?

    - by LockeCJ
    I'm trying to build a Windows Workflow (WF) project using NAnt, but it doesn;t seem to be able to build the ".xoml" and ".rules" files. Here is the code of the csc task that I'm using: <csc debug="${build.Debug}" warninglevel="${build.WarningLevel}" target="library" output="${path::combine(build.OutputDir,assembly.Name+'.dll')}" verbose="${build.Verbose}" doc="${path::combine(build.OutputDir,assembly.Name+'.xml')}"> <sources basedir="${assembly.BaseDir}"> <include name="**/*.cs" /> <include name="**/*.xoml" /> <include name="**/*.rules" /> </sources> <resources basedir="${assembly.BaseDir}"> <include name="**/*.xsd" /> <include name="**/*.resx" /> </resources> <references> ... </references> </csc> Here's the output: Compiling 21 files to 'c:\Output\MyWorkFlowProject.dll'. [csc] c:\Projects\MyWorkFlowProject\AProcessFlow.xoml(1,1): error CS0116: A namespace does not directly contain members such as fields or methods [csc] c:\Projects\MyWorkFlowProject\BProcessFlow.xoml(1,1): error CS0116: A namespace does not directly contain members such as fields or methods [csc] c:\Projects\MyWorkFlowProject\CProcessFlow.rules(1,1): error CS0116: A namespace does not directly contain members such as fields or methods [csc] c:\Projects\MyWorkFlowProject\CProcessFlow.xoml(1,1): error CS0116: A namespace does not directly contain members such as fields or methods

    Read the article

  • jQuery datepicker getMinDate '+1d'

    - by Adrian Adkison
    Once I have set the minDate property of a datepicker with the convenient string syntax $(elem).datepicker('option','minDate','+1d +3m'); how can I get the date object of the minDate? To help illustrate, there is a method $(elem).datepicker('getDate'); which returns the date that is entered in the input in the format of a date object. I would like the same thing but for datepicker('getMinDate'). There is an option like this $(elem).datepicker('option','minDate'); but this returns '+1d +3m' which is not helpful. I need the actual date object to compare with another date object. Any ideas?

    Read the article

  • How to store the path of a game pawn in a turn based game ?

    - by panzerschreck
    Hello, I have a square grid, for a turn based game ( grid is similar to the chess board ), but the moves in the games are different based on whether you have lapped your opponent pawn at least once or not. i.e if you have not lapped (beaten any of the opponents pawns) in the outer most grid as below if you have lapped your opponent pawn once at least, then you get to reach home,this way.Any player having all his pawns reaching "home" first wins. The ones in yellow are safe-houses, i.e both the opponent pawn and the player's pawn get to stay in the same grid, this is not considered to be lapping ( the opponent ).The lapped pawn will return to its start point. Now the question is, what is the effective way to store the paths for the all the pawns.we will have 4 pawns for the player and 4 opponent pawns. Is there any pattern to store such static information, in a elegant way ? Thanks for your time

    Read the article

  • Android quiz .....?

    - by user346665
    How to make android quiz? I will have question with 3 possible answers (radio buttons),next another question, another... etc How is the smartly to make? To have one view and dynamically to create controls or to have view for each question.

    Read the article

  • assert fact into file in prolog

    - by smile
    Hello everyone, How can I assert a fact into a file without deleting the previous fact? In the following line, when I execute it twice, the second fact overwrites the first fact: tell('animal.txt'),write(Animal),nl,told. But when I use assert or assertz it will do nothing. Help me please. Thank you :)

    Read the article

  • .NET Windows Live Messenger Connectivity?

    - by Pcstalljr
    Hey there guys, I'm working on an IRC bot project, Trying to integrate Windows live into a bot, And have received messages sent to the channel. But the current problem is that the old messenger API that I had no longer works. And the current API i can only find information about addins (complicated for the end user to set up unless I make an installer), Or contact information. I would like my bot to be stand-alone (no messenger required) and have it log in it self, But I can not find information on the login process anywhere. Any ideas?

    Read the article

  • How do I get SpecFlow to expect an exception?

    - by Roger Lipscombe
    I'm using SpecFlow, and I'd like to write a scenario such as the following: Scenario: Pressing add with an empty stack throws an exception Given I have entered nothing into the calculator When I press add Then it should throw an exception It's calculator.Add() that's going to throw an exception, so how do I handle this in the method marked [Then]?

    Read the article

  • Visual studio 2010 doesn't make the changes when i do a build/compile a DLL file

    - by Tom
    Ok so i change some code, re-build it and then, say for arguments sake i had a print statement outputting 'test2', well if i change it to 'test3' its still re-producing the old code 'test2'. Ive deleted the debug folder and rebuilt but no good. Then randomly about 10 builds later it will catch up. Ive also closed VS2010 and then re-opened the project but that doesnt help. What can i do as i need to see the changes asap? ps it's definitely the correct file EDIT: I've done clean and rebuild but it hasnt done anything EDIT: This is a .dll file which im modifying

    Read the article

  • What initial modelling/design activities on Agile Projects do you do??

    - by dalton
    When developing an application using agile techniques, what if any initial modelling/architecture activities do you do, and how do you capture that knowledge?? I'm not after a bullet list about XP, Scrum, Crystal, DSDM..etc as I'm familiar with the methodologies. But what do you do above and beyond the guidance given by these. I find I work best by thinking the system through first, but also like the benefits of timeboxing, story cards, pairing, tdd. The closest thing I've seen so far is Scott Ambler's Initial Architecture Modelling, but was wondering what alternatives are used out there?

    Read the article

  • Apache AddType to all extention?

    - by acidzombie24
    I am follwing these awesome instructions http://blog.ruski.co.za/page/Install-Mono-on-Ubuntu.aspx and at this point i understand what is happening (except i dont reconize why .config would need to be an ext) I would like all urls to use x-asp-net so urls like site.com/data/user/more/title anything goes.lol woot.falseExt with space AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx How do i do that? also it would be nice if i can make it so php still runs normally on other sites but thats not my concern right now. I need all urls to be able to run on this server/site

    Read the article

  • [Windows 7] Certain Programs cannot access internet

    - by Cindy
    Operating System: Windows 7 (x64) Problem: Certain Programs are unable to access the internet. They claim that there is no connection when you already are connected. Hello, before we start. Just letting you know I'm new here, and I'm very new to Windows 7. I installed it two days ago. I just installed Windows 7 on my laptop and I have a few problems. I play World of Warcraft, as well as a variety of games. And when I first attempt to log into the game, I get a windows error message, but it doesn't stop there. I thought World of Warcraft got corrupted during the upgrade. It seems that I am unable to access the internet from other online games as well. Most say in along the lines of "Cannot connect to patch server, try again later." I cannot use a downloader Also, I have internet explorer. The x32 version of the browser cannot connect to the internet, and when I try to enter "google.com", it says the same thing. I'm only accessing this site through Internet Explorer x64, which I would have been fine with is it's compatible with Adobe Flash. The only thing that seems to connect to the internet are Internet Explorer x64 and Windows Live Messenger. Here are the steps I have taken, but none worked. 1.) Disable Windows Firewall 2.) Have Windows Firewall Enabled, but allow the specific programs to access internet. And allowed all incoming access. 3.) Disabled UAC, Ran the programs as an admin, and set compatibility to Vista. 4.) Uninstalled an anti-virus program. (McAffee Security Suite 2010) 5.) Reinstalled the programs 6.) Reinstalled Windows 7 7.) Retaken the steps on the Administrator account. Please assist me in this problem. I need to get back into the game. Thanks so much in advance.

    Read the article

  • is there a size limit to a text file?

    - by chicane
    HI All I am creating a log file for our website which will log every log-in by all the users to our orders area. I wish to know if you think its good to enter this log info in just one single file or should this be split up once the log file hits a certain size? My concern is that this file will get rather large over time, but im not certain of the size limit of a text file? thank you

    Read the article

  • xcode UIWebView - Text Fields = No on screen keyboard.

    - by Aakburns
    This application is used to let you use our company basecamp site and only that site. When logged in, if you go to post a new message, you can insert text in the title text field, but if you try to tap in the message body section, it does not bring up the keyboard. I have to assume it's something with my coding, because safari works just fine with it. You can pick textile/html mode or easy. The keyboard does come up in textile/html mode but not in easy formatting mode. Any ideas? Here are some screenshot examples from the iPad. This is shown as the text view not working, no keyboard comes up when you tap in the box. arikburnsDOTcom/forums/fn/IMG_0007.png If you click on 'Switch to Textile/HTML' As seen in the image above, you are presented with this new text box which you can tap in and the keyboard comes up. arikburnsDOTcom/forums/fn/IMG_0006.PNG Now, also note, if you load this same page up in safari, it doesn't actually give you an option as to what text formatting to use, it just works. No options. I basically need to force the 'Textile/HTML' text box somehow and no I cannot change the website code itself. Thanks in advance.

    Read the article

  • Programmatically implementing an interface that combines some instances of the same interface in var

    - by namin
    What is the best way to implement an interface that combines some instances of the same interface in various specified ways? I need to do this for multiple interfaces and I want to minimize the boilerplate and still achieve good efficiency, because I need this for a critical production system. Here is a sketch of the problem. Abstractly, I have a generic combiner class which takes the instances and specify the various combinators: class Combiner<I> { I[] instances; <T> T combineSomeWay(InstanceMethod<I,T> method) { // ... method.call(instances[i]) ... combined in some way ... } // more combinators } Now, let's say I want to implement the following interface among many others: Interface Foo { String bar(int baz); } I want to end up with code like this: class FooCombiner implements Foo { Combiner<Foo> combiner; @Override public String bar(final int baz) { return combiner.combineSomeWay(new InstanceMethod<Foo, String> { @Override public call(Foo instance) { return instance.bar(baz); } }); } } Now, this can quickly get long and winded if the interfaces have lots of methods. I know I could use a dynamic proxy from the Java reflection API to implement such interfaces, but method access via reflection is hundred times slower. So what are the alternatives to boilerplate and reflection in this case?

    Read the article

  • Anchor without href

    - by Idsa
    What is the best crossbrowser way to make anchor without href (javascript-driven) behave like real anchor? The most obvious one is to use # as anchor but it makes page jump...

    Read the article

  • Creating a post-build step in Xcode 3.2

    - by jsheehy
    I'm actually looking for a genuine "post build" phase - not the Run script stage. The reason for this is that I want to do some parsing of a target's build-state.dat which is where Xcode puts all of its build output. The problem is that this file isn't actually created until after the build has succeeded or failed, thus anything in the Run Script phase can't see it. Any clues? Thanks

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >