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 Brown Shoes

@Mr Brown Shoes
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Bizare web service proxy server issue
    M Mr Brown Shoes

    The following code seems to work: IWebProxy iwp20 = WebRequest.DefaultWebProxy; string requestURL = Properties.Settings.Default.xxInput_localhost_xxServices; string proxyAddress = iwp20.GetProxy(new Uri(requestURL)).ToString(); if (!proxyAddress.Equals(requestURL)) { WebProxy myProxy = new WebProxy(); myProxy.Address = new Uri(proxyAddress); myProxy.Credentials = CredentialCache.DefaultCredentials; xxServices.Proxy = myProxy; } Now I just have to figure out how to get the auto upgrade feature of click once deployment working through the proxy server.

    Web Development help database sysadmin csharp testing

  • Bizare web service proxy server issue
    M Mr Brown Shoes

    Hi, A little background on the application first. It is a .NET 2.0 win forms app which connects to a .NET 2.0 web service using WSE 3.0. When the user makes requests to login, a login method is called on the web reference. If this throws an error, an attempt is made to log the error to a database using another method on the web reference. If this fails enterprise exception handling takes over and the error is logged to a local file. Proxy details are set on the web reference before any methods are called (see code at end). The Problem: When the user tries to login an error is thrown stating proxy access denied, an attempt is then made to log this error causing another proxy access denied error. Finally this error is logged in a local text file. The Bizare Part: Even with the errors described above, the web service still records in the DB that the user logged in, and still records in the error log table "Proxy Access Denied" even though it had to go through the proxy to record the login and to log that error??? The Exact Error (logged in the database using the web service): System.Net.WebException: The request failed with HTTP status 407: Proxy Access Denied. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at xx.Input.localhost.xxServicesWse.GetLoginData(String userName, String password) at xx.Input.Data.UserDataManager.login(String uName, String pWrd) at xx.Input.GUI.xxInput.loginInterface_login(Object sender, LoginArgs le) Where do I go from here to solve this proxy problem. Note that testing the system on a network without a proxy works fine, even if the client contacts the web service accross the internet. The Code: (returns the web reference used through the client) using System; using System.Collections.Generic; using System.Text; using xx.Input.localhost; using System.Net; namespace xx.Input.Web_Service { internal class ServiceProxyFactory { public static xxServicesWse GetxxService() { xxServicesWse xxServices = new xxServicesWse(); //Add a cookie to the web service to allow the use of session on the server side System.Net.CookieContainer cookies = new System.Net.CookieContainer(); xxServices.CookieContainer = cookies; //Set up credentials for a possible prox

    Web Development help database sysadmin csharp testing

  • DataGridView.remove how do i call this , help ?
    M Mr Brown Shoes

    Hi, The DataGridView is a visual representation of the data to which it's bound, so the best way to remove a row is to remove it from said bound data source. Also, be weary of code such as: foreach (DataGridViewRowCollection Row in rows) { // // Row.remove (?) } As you are removing something from a collection you're currently searching through.. that can get messy.

    .NET (Core and Framework) question help tutorial

  • Click Once Deployment & logging
    M Mr Brown Shoes

    Hi, I've recently built a smart client which uses 'click once deployment'. The program also uses the Enterprise Library for logging (among other things). Any errors that are encountered get logged to a database through a web service. If the communication with the web service or database fails a second logging policy is used which logs errors to a txt file. I recently encountered such an error that caused the program to use the second policy, but I don't know where it put the log file... Click once deployment creates a program group in the start menu for the smart client which hold the executable, not a shortcut, but the actual executable. Any idea where it installs the associated DLL's, app.config file, or potential log files? When I run the program on my development machine (not a click once deployed version) it simply creates the log file in the same directory as the executable. Thanks in Advance.

    .NET (Core and Framework) database sysadmin help question announcement

  • Enterprise Library, Data Access Application Block (DAAB), Best Practicises Question
    M Mr Brown Shoes

    K, I had a similar architecture to what you’re advocating before I moved to use the DAAB. I'm looking for advice more specific to the DAAB. For example, putting the Database object in the session will not put the connection in the session, the database object provides a method to create and return a connection based on settings in the web config file. And when you call a method on the Database object, such as ExecuteNonQuery, you don't explicitly give a connection. I assume that it creates one internally based on the config file. So given the examples on using the DAAB that I have seen, there's no way to share a single connection between multiple queries without the use of a transaction or additional verbose code. Based on this I guess the best thing to do is put the database object in the session and then call methods such as LoadData and ExecuteNonQuery where necessary, Let the DAAB handle the connections completely.

    .NET (Core and Framework) database question css data-structures business

  • it might be simple but making me puzzled
    M Mr Brown Shoes

    The article: http://support.microsoft.com/kb/325093/[^] also mentions registering a dll rather than the command supplied by hbk723. Check it out if said command doesn't work.

    .NET (Core and Framework) question csharp sysadmin windows-admin help

  • Issue with DatabaseFactory.CreateDatabase
    M Mr Brown Shoes

    Does the line DatabaseFactory.CreateDatabase(_DatabaseInstanceName) work elsewhere in your code? If not, is the connection string set up properly in your config file? If so, is your code able to access the config file?

    .NET (Core and Framework) database help question

  • Enterprise Library, Data Access Application Block (DAAB), Best Practicises Question
    M Mr Brown Shoes

    Thanks for the reply Will, The application in question is a web services project that returns data to both an ASP.NET and Windows Forms App so your recommendation won't really apply. At first I tried dragging and dropping connections and data adapters etc onto my web services file but I found the code generated to be very untidy. I instead opted to have my web service class contact a business facade, which then contacts other classes in a business layer, which finally contact a database layer where I have utilised the DAAB. So to further define my question; do I create the Database object in the global.asax session start method, and then use the reference in each class required in the data layer? Do I create the connection each time a service is requested and pass it down to each class required in the data layer? Or do I just use the DatabaseFactory.CreateDatabase() method when it is required within each method of my data layer classes? I notice that when using a Database object supplied by the DAAB that you do not specify the connection string when you use a method such as 'ExecuteNonQuery', this suggest to me that the connection can be managed at this lower level.

    .NET (Core and Framework) database question css data-structures business

  • Enterprise Library, Data Access Application Block (DAAB), Best Practicises Question
    M Mr Brown Shoes

    Hi, From an architectural perspective is it best to use the DatabaseFactory.CreateDatabase() method once at the top of a method call stack, and pass its reference to each method in the stack that needs database access, or should each method in the data-layer use the DatabaseFactory.CreateDatabase() method internally. Clearly the first approach uses less resources, as quite a lot of code is utilised by the DatabaseFactory.CreateDatabase() method, including reading the web.config file, however the second approach keeps the Data Layer tightly cohesive and loosely coupled from other sections. For example let’s examine a web service solution. Assuming that the service document has a web method, which in-turn calls a business facade. The facade then forwards necessary information to one or more 'information managers'. These then utilise 'data managers' which provide scalar values, Datasets etc required for their calculations. Should each method in the data managers use DatabaseFactory.CreateDatabase() to get a connection to the DB for executing various commands, or should this be called once at the business facade level and a reference passed to each Info manager which in-turn pass to respective data managers? Could anyone make a recommendation based on experience? Thanks in advance.

    .NET (Core and Framework) database question css data-structures business
  • Login

  • Don't have an account? Register

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