Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

Mr Jen Withers

@Mr Jen Withers
About
Posts
13
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Webservices & Reflection & Request types.
    M Mr Jen Withers

    Hi guys, Ive got a complex problem that I could really use some help / opinions on. Iam in the process of extending the webservice class to add some additional functionality that I require. I have a requirement where I need to write ALOT of public webservices for various things in my application. Natively the webservices return xml which is great for the public side of the interface but I would also like them to have the ability to return something other then xml - say html or CSV. So I have written some XSLT that will run against the XML output of the webservice and transform it into whatever I require. The problem is I want to be able to switch the output of the webservice form xml to my xslt output by changing the request type for say "text/CustomXSLT". I would like to do this so I dont have to implement 2 methods for each webmethod just to cover my requirement. To do this I have implemented a method attribute that marks a webmethod also as an xslt method: [

    XSLTMethod ("CaseSearch_HTML_Table.xslt" , typeof (SearchCases))]

    I have taken the lead from this code project article (see link below) and implemented a very similar system where by I can intercept the method call and manually invoke the method with reflection and put out the correct response. Extending an existing ASP.NET Web Service to support JSON[^] However I have hit a road block. All the input parameters in the request.form collection are strings. To make my extension class generic I will need to either write some kind of generic type marshaller to go from string to value or do something else totally horrid. Iam so close to getting something working here which has alot of value to me but this could be a show stopper. Iam very new to reflection in .net so iam hoping there is alot i dont understand. I was trying to get the .net source so I can see how the standard webservice class handles this kind of type marshalling and see if there is anything i can reuse but the link to the source on the MS site is down :-( Thanks in Advance for any help Mike

    .NET (Core and Framework) xml help csharp html asp-net

  • Is LINQ the best technology for my application
    M Mr Jen Withers

    thanks for taking the time to reply - I will put two big ticks in the Linq box :-)

    LINQ database csharp help linq

  • Is LINQ the best technology for my application
    M Mr Jen Withers

    thanks for all the replies guys. Legacy Databases are a huge pain - ive got all kinds of things like tables that link back onto themselves and lots of other nasties. My head i rammed full of patterns at the moment trying to decide if I should be abstracting my problem domain into domain entity objects or just trying to implement some simple DAL objects that provide the functionality i need...Why is finding answers always sooo hard.

    LINQ database csharp help linq

  • Is LINQ the best technology for my application
    M Mr Jen Withers

    Hi, Iam currently looking at a number of Data Access / Persistance frameworks and trying to establish if they are appropriate for my application. One of these is LINQ to Entities. My application is a medium - largish sized enterprise software platform that is being written in C# and being built upon a legacy SQL2000 database. One problem I have is the legacy database has no enforced relationship integrity (Foreign Key constraints) meaning that all integrity checking / mapping is currently done with adhoc SQL in the program code. Further to this a integer identity variable has been used as a surrogate primary key for every primary key column and iam not sure how LINQ will cope with this either. I know with standard ADO.net I would have to select @@scope_identity to get the ID of a recently inserted row so I can then use that in another table elsewhere in the same scope of program code for building relationships - which is obviously a pain. My concern with using LINQ with a legacy DB like this is "how will Linq cope with having no enforced relationships in the DB?". I have been told that we cannot change the database schema / design in anyway as we have too many customers dependant on the current design and it could cause massive problems if we did. Also I would like to understand how linq will cope with building relationships that our based on int identity primary keys. I should probably mention the existing application is 15 years old and has been written in VB6, hence our desperate need to rewrite the program code with more contempory technology patterns and methods. Iam sure non of these concerns are new and I would really like to draw on the experience of some of the LINQ developers on this message board who have had similar experiences! Thanks for your help in advance guys! Mike

    LINQ database csharp help linq

  • Win32 Global hooks and mouse overs....
    M Mr Jen Withers

    I had looked into this and it doesnt seem to hard to do providing I learn enough about the win32 API. However the part which seems to vary between applications is capturing the relevant messages. Ive used winspector to look at messages being sent back & forth between windows and there does appear to be any pattern to what happens when something under the cursor changes due to a 'mouse over'. I noticed the startbar (dv3controlhost , syslistview32) calls wm_ncpaint followed by wm_erasebackground when I move between items and the mouse overs activate but this doesnt seem consistance with other applications ive looked at like Adobe Audition. But ive notice Adobde Audition uses alot of custom classes in its contruction......

    C / C++ / MFC question csharp visual-studio help

  • Win32 Global hooks and mouse overs....
    M Mr Jen Withers

    Hey there, ive got a feeling there wont be an easy answer / solution to this question but if you dont ask you dont get! I was wondering if there is any way to globally capture mouse overs in windows. Iam not sure if the way ive described this will make much sense to anyone so a quick usecase might help. When a user opens up the start menu and highlights 'my documents', the background colour changes to blue to show you have your mouse hovered over it. Can this event possibly be captured? I imagine capturing mouse overs on the start menu will be different to say catching a highlighted menu option in visual studio. But id really like to know if there is any way of globally detecting when hovering the mouse "highlights" something on the screen in relation. Any help guys? Thanks in advance

    C / C++ / MFC question csharp visual-studio help

  • ADO.net locks out SQL2000 user account under load
    M Mr Jen Withers

    Hey There thanks for the advice, I think I could do with reading up on thread safe code! Would it be worth while turning my Database connection code into an instanciable object and totally removing the static keywords to try and avoid these issues? Thanks Mike

    C# database csharp help visual-studio sysadmin

  • ADO.net locks out SQL2000 user account under load
    M Mr Jen Withers

    This is a strange problem to describe so you will have to bear with me! I have developed a web application using c#.net that utilises server side ASPX pages that connect to a SQL2000 database. I have been load testing my application with the Microsoft Application Test Center that comes with Visual Studio 2003, with simulated loads of 10 - 400 users. When I run a test against my web application for upwards of 10 concurrent users I start to get strange results from the database for what should be routine queries. I execute a simple query looking for a row in a table which I know is there (100% certain!) and the query returns the results to a dataset. I then get the first datatable from the dataset and check that the dataset.rows.count variable is greater then 0. Which it always is! I then proceed to look for a column that exists in the table which I specifically selected and an exception is thrown telling me the column doesnt exist in the datatable. This is actually impossible the data is DEFINATLEY there! I can log into SQL Query analyser as the same SQL logon that the ASPX page uses to connect and run the same query and it returns the expected results without error or anaomoly. Once an error of this type has occured, I can replicated it upto 10 minutes after it first has happened. During this 10 minute period I can switch the SQL logon the ASPX uses and it runs fine. As soon as I switch it back to the user on which the error occured it demonstrates the same problem again. After 10 minutes the problem disappears and wont happen again until I apply a heavy load to the server. As an important note, I have now managed to replicate an identical problem with just 2 users trying to concurrently login. Here is the snippet of code iam using to query the database:

        public static DataSet execute\_DataTable(String SQL\_Command\_String)
        {
            
            String connectionString;
            
            connectionString = getConnectionString(@"..\\xml\_Settings\\DB\_Connect.xml");
            makeConnection(connectionString);
    
            DataSet dsResults = new DataSet();
            try
            {
                SqlDataAdapter dbAdapter = new SqlDataAdapter(SQL\_Command\_String, dbConn);
                dbAdapter.Fill(dsResults, "Results");
            }
            catch (Exception exp)
            {
                throw new Exception(exp.Message + " " + exp.StackTrace, exp);
            }
            finally
            {
                dbConn.Close();
    
    C# database csharp help visual-studio sysadmin

  • HTTP Request Forwarding in Classic ASP
    M Mr Jen Withers

    Hey - Iam not sure if this is even possible with the limited API in classic ASP, but I need to find a way to forward a HTTP post request to a given URL. I need to do this to avoid a cross domain scripting issue where I cant get the target users to change their security settings. The client server is using IIS5 on windows2000 server so iam assuming I have no .net. The only other way of achieve this task instead of using classic ASP or .net is to use a console style CGI maybe - but id rather not rely on this! Thanks for any help in advance - Mike

    Web Development help csharp sysadmin security json

  • Installer brain-ache!
    M Mr Jen Withers

    oh course that is very correct and for installers compression is always good. But in this case I need to give the user the ability to launch the software from the CD as a webpage on the autorun, so it needs to be lose in a conventional file structure on the CD!

    IT & Infrastructure question learning

  • Installer brain-ache!
    M Mr Jen Withers

    I have a software product that is basically a website and is about 400mb in size that needs to be installable from a CD and be able to run from the CD with no installation. This means putting all the website content onto the installer CD uncompressed in a convential file structure. Because it needs to be installable I also need to have an installer that will just copy all the content from the CD to a location on a hard-drive and do basic tasks such as setting up the start menu short cuts etc. Having the ability to uninstall would also be desirable. As far as I can tell, all the installer technologies ive looked at insist on compressing or dont make it clear if compression is mandatory. Can anybody suggest an installer technology or point me in the right direction? Ive tried writing something simple in VB6 to take care of this, but getting such things as progress bars to work in VB6 seems to be a challenge and I feel the time would better be spent learning a installer technology! Thanks Guys Mike

    IT & Infrastructure question learning

  • Hidden forms
    M Mr Jen Withers

    Iam currently in the middle of writing a screen grabbing app in c#. One of the requirements for the application is that the form or window of my application doesnt appear in the grabed images. Under XP this was easy as I just set the form to not appear in the task manager in the form properties in visual studio and when it was minimised you couldnt see it at all. The same nearly applies to vista, I cant see the window when minimised and it doesnt appear on the taskbar. However when it is minimised I seem to get a floating tab of the window in the main desktop. I dont know if this can be disabled with a vista control panel setting or there is some other way of doing it with code but I cant seem to find it either way. Can anyone possibley help with this. Much appreciated Mike

    Windows API csharp visual-studio business help

  • Hiding a form in Vista
    M Mr Jen Withers

    Iam currently in the middle of writing a screen grabbing app in c#. One of the requirements for the application is that the form or window of my application doesnt appear in the grabed images. Under XP this was easy as I just set the form to not appear in the task manager in the form properties in visual studio and when it was minimised you couldnt see it at all. The same nearly applies to vista, I cant see the window when minimised and it doesnt appear on the taskbar. However when it is minimised I seem to get a floating tab of the window in the main desktop. I dont know if this can be disabled with a vista control panel setting or there is some other way of doing it with code but I cant seem to find it either way. Can anyone possibley help with this. Much appreciated Mike

    C# csharp visual-studio business help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups