Search Results

Search found 463 results on 19 pages for 'dotnet practitioner'.

Page 16/19 | < Previous Page | 12 13 14 15 16 17 18 19  | Next Page >

  • Do NOT Change "Copy Local” project references to false, unless understand subsequences.

    - by Michael Freidgeim
    To optimize performance of visual studio build I've found multiple recommendations to change CopyLocal property for dependent dlls to false,e.g. From http://stackoverflow.com/questions/690033/best-practices-for-large-solutions-in-visual-studio-2008 CopyLocal? For sure turn this offhttp://stackoverflow.com/questions/280751/what-is-the-best-practice-for-copy-local-and-with-project-referencesAlways set the Copy Local property to false and enforce this via a custom msbuild stephttp://codebetter.com/patricksmacchia/2007/06/20/benefit-from-the-c-and-vb-net-compilers-perf/BenefitBenefitMy advice is to always set ‘Copy Local’ to falseSome time ago we've tried to change the setting to false, and found that it causes problem for deployment of top-level projects.Recently I've followed the suggestion and changed the settings for middle-level projects. It didn't cause immediate issues, but I was warned by Readify Consultant Colin Savage about possible errors during deploymentsI haven't undone the changes immediately and we found a few issues during testing.There are many scenarios, when you need to have Copy Local’ left to True.The concerns are highlighted in some stack overflow answers, but they have small number of votes.Top-level projects:  set copy local = true.First of all, it doesn't work correctly for top-level projects, i.e. executables or web sites.As pointed in the answer http://stackoverflow.com/a/6529461/52277for all the references in the one at the top set copy local = true.Alternatively you have to change output directory as it's described in http://www.simple-talk.com/dotnet/.net-framework/partitioning-your-code-base-through-.net-assemblies-and-visual-studio-projects/If you set ‘ Copy Local = false’, VS will, unless you tell it otherwise, place each assembly alone in its own .\bin\Debugdirectory. Because of this, you will need to configure VS to place assemblies together in the same directory. To do so, for each VS project, go to VS > Project Properties > Build tab > Output path, and set the Ouput path to ..\bin\Debugfor debug configuration, and ..\bin\Release for release configuration.Second-level  dependencies:  set copy local = true.Another example when copylocal =false fails on run-time, is when top level assembly doesn't directly referenced one of indirect dependencies.E..g. Top-level assembly A has reference to assembly B with copylocal =true, but assembly B has reference to assembly C with copylocal =false. Most likely assembly C will be missing on runtime and will cause errors E.g. http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1Copy local is important for deployment scenarios and tools. As a general rule you should use CopyLocal=True and http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1 Unfortunately there are some quirks and CopyLocal won't necessary work as expected for assembly references in secondary assemblies structured as shown below.MainApp.exe MyLibrary.dll ThirdPartyLibrary.dll (if in the GAC CopyLocal won't copy to MainApp bin folder)This makes xcopy deployments difficult . .Reflection called DLLs  dependencies:  set copy local = true.E.g user can see error "ISystem.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."The fix for the issue is recommended in http://stackoverflow.com/a/6200173/52277"I solved this issue by setting the Copy Local attribute of my project's references to true."In general, the problems with investigation of deployment issues may overweight the benefits of reduced build time. Setting the Copy Local to false without considering deployment issues is not a good idea.

    Read the article

  • Using the latest (stable release) of Oracle Developer Tools for Visual Studio 11.1.0.7.20.

    - by mbcrump
    +  = Simple and safe Data connections.   This guide is for someone wanting to use the latest ODP.NET quickly without reading the official documentation. This guide will get you up and running in about 15 minutes. I have reviewed my referral link to my simple Setting up ODP.net with Win7 x64 and noticed most people were searching for one of the following terms: “how to use odp.net with vs” “setup connection odp.net” “query db using odp and vs” While my article provided links and a sample tnsnames.ora file, it really didn’t tell you how to use it. I’m hoping that this brief tutorial will help. So before we get started, you will need the following: Download the following: www.oracle.com/technology/software/tech/dotnet/utilsoft.html from oracle and install it. It is the first one on the page. Visual Studio 2008 or 2010. It should be noted that The System.Data.OracleClient namespace is the OLD .NET Framework Data Provider for Oracle. It should not be used anymore as it has been depreciated. The latest version which is what we are using is Oracle.DataAccess.Client. First things first, Add a reference to the Oracle.DataAccess.Client after you install ODP.NET   Copy and paste the following C# code into your project and replace the relevant info including the query string and you should be able to return data. I have commented several lines of code to assist in understanding what it is doing.   Lambda Expression. using System; using System.Data; using Oracle.DataAccess.Client;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {           try         {             //Setup DataSource             string oradb = "Data Source=(DESCRIPTION ="                                    + "(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)))"                                    + "(CONNECT_DATA = (SERVICE_NAME = SERVICENAME))) ;"                                    + "Persist Security Info=True;User ID=USER;Password=PASSWORD;";                        //Open Connection to Oracle - this could be moved outside the try.             OracleConnection conn = new OracleConnection(oradb);             conn.Open();               //Create cmd and use parameters to prevent SQL injection attacks.             OracleCommand cmd = new OracleCommand();             cmd.Connection = conn;               cmd.CommandText = "select username from table where username = :username";               OracleParameter p1 = new OracleParameter("username", OracleDbType.Varchar2);             p1.Value = username;             cmd.Parameters.Add(p1);               cmd.CommandType = CommandType.Text;               OracleDataReader dr = cmd.ExecuteReader();             dr.Read();               //Contains the value of the datarow             Console.WriteLine(dr["username"].ToString());               //Disposes of objects.             dr.Dispose();             cmd.Dispose();             conn.Dispose();         }           catch (OracleException ex) // Catches only Oracle errors         {             switch (ex.Number)             {                 case 1:                     Console.WriteLine("Error attempting to insert duplicate data.");                     break;                 case 12545:                     Console.WriteLine("The database is unavailable.");                     break;                 default:                     Console.WriteLine(ex.Message.ToString());                     break;             }         }           catch (Exception ex) // Catches any error not previously caught         {                   Console.WriteLine("Unidentified Error: " + ex.Message.ToString());              }         }       }           } At this point, you should have a working Program that returns data from an oracle database. If you are still having trouble then drop me a line and I will be happy to assist. As of this writing, oracle has announced the latest beta release of ODP.NET 11.2.0.1.1 Beta.  This release includes .NET Framework 4 and .NET Framework 4 Client Profile support. You may want to hold off on this version for a while as its BETA, and I wouldn’t want any production code using any BETA software.

    Read the article

  • How to call a .NET Webservice from Android using KSOAP2?

    - by Rajapandian
    Hai to All,I have a problem while calling the webservice,i have a .NET web service in the server and i am using KSOAP2(ksoap2-j2se-full-2.1.2) in android.While running the program i got an runtime Exception like "org.ksoap2.serialization.SoapPrimitive". I dont know what to do.Here is my code. package projects.ksoap2sample; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.*; import android.os.*; import android.widget.TextView; public class ksoap2sample extends Activity { /** Called when the activity is first created. */ private static final String SOAP_ACTION = "http://tempuri.org/HelloWorld"; private static final String METHOD_NAME = "HelloWorld"; private static final String NAMESPACE = "http://tempuri.org/"; private static final String URL = "http://192.168.1.19/TestWeb/WebService.asmx"; TextView tv; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tv=(TextView)findViewById(R.id.text1); try { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); //request.addProperty("prop1", "myprop"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); Object result = (Object)envelope.getResponse(); String[] results = (String[]) result; tv.setText( ""+results[0]); } catch (Exception e) { tv.setText(e.getMessage()); } } } May be my code is wrong.please help me. Regards Rajapandian

    Read the article

  • Chart controls for ASP.NET

    - by tolism7
    I am looking people's opinion and experience on using chart controls within an ASP.NET application (web forms or MVC) primarily but also in any kind of project. I am currently doing my research and I have a pretty big list of controls to evaluate. My list includes (in no particular order): ASP.NET controls: DevExpress XtraCharts (http://demos.devexpress.com/XtraChartsDemos/) Dundas Chart for .NET (http://www.dundas.com/) Telerik RadChart for ASP.NET AJAX (http://www.telerik.com/) ComponentArt Charting & Visualization for ASP.NET (http://www.componentart.com/) Infragistics WebChart (http://www.infragistics.com/dotnet/netadvantage/aspnet.aspx#Overview) .net Charting (http://www.dotnetcharting.com/) Chart Control for .Net Framework (Microsoft's) (http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx) Flash controls: FusionCharts v3 (http://www.fusioncharts.com/) XML/SWF Charts (http://www.maani.us/xml%5Fcharts/index.php) amCharts (http://www.amcharts.com/) AnyChart (http://www.anychart.com/home/) Javascript: Flot (http://code.google.com/p/flot/) Flotr (http://solutoire.com/flotr/) jqPlot (http://www.jqplot.com/index.php) (If I missed some that worth to be compared against the above please let me know.) What I am looking is opinions on using any of the above so I can form my own and help others do the same, based on what I read here. I do not care which one is better. What I care for is why someone likes one of the above and what do these controls offer as a distinct advantage. I am interested in developer's opinion and I would like to find out which things are difficult doing with any of the above controls and which things are easy to achieve. AJAX compatibility (build in to the controls but also manual), ASP.NET compatibility, input capabilities, data binding options, performance, how much code does one need to write in order to create a chart, are some of the things that I would want to read about. I have already done my research on StackOverflow for relevant questions but there is nothing on the level of detail that I would want to read in order to make a responsible decision.

    Read the article

  • VB.Net plugin using Matlab COM Automation Server...Error: 'Could not load Interop.MLApp'

    - by Ben
    My Problem: I am using Matlab COM Automation Server to call and execute matlab .m files from a VB.Net plugin for a CAD program called Rhino 3D. The code works flawlessly when set up as a simple Windows Application in Visual Studio, but when I insert it (and make the requisite reference) into my .Net plugin and test it in the CAD program I get the following error: "Could not load file or assembly 'Interop.MLApp, Version 1.0.0.0, culture=neutral, PublicKeyToken=null' or one of its dependencies. the system cannot find the file specified." What I've Tried: I am baffled as to why this occurs, but I was able to contact the CAD program's technical support staff and they suggested that it has something to do with their DotNet SDK having trouble with references that are located far outside the CAD program directory. They didn't have any solutions so I tried playing around with copylocal and this made no difference. I tried using other COM libraries and the Open Office automation server works fine, although uses url's instead of requiring a reference. I also tested Excel, which does require a reference, and it returned the error: "retrieving the COM class factory for component with CLSID {...} failed due to the following error: 80040154." This may or may not be related to the issue with the Matlab COM reference, but I thought was worthwhile to share. Perhaps is there another way to reference Interop.MLApp? I would appreciate any suggestions or thoughts on how I might make the Matlab Interop.MLApp reference work. Best regards, Ben

    Read the article

  • Call webservice from Android using KSoap simply returning "error" string

    - by w00tfest99
    I'm trying to use ksoap to call a simple webservice. I followed this video to try to get started. When I call "getResponse()" on the envelope I just get the string "Error". There's no exceptions thrown or any other detail. I've successfully connected to a simple webservice I just setup on my local machine. Could this potentially be related to being behind a proxy server here at work? My code is below: String SOAP_ACTION="http://tempuri.org/CelsiusToFahrenheit"; String METHOD_NAME = "CelsiusToFahrenheit"; String NAMESPACE = "http://tempuri.org"; String URL = "http://w3schools.com/webservices/tempconvert.asmx"; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName("Celsius"); pi.setValue("32"); request.addProperty(pi); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE aht = new HttpTransportSE(URL); try { aht.call(SOAP_ACTION, envelope); SoapPrimitive results = (SoapPrimitive)envelope.getResponse(); } catch (Exception e) { e.printStackTrace(); }

    Read the article

  • How to connect to a SOAP webServices with Android

    - by dom4
    Hi everyone,I'm programming an application who must send coordinate and request to a WebServices this is my code: private String SOAP_ACTION = "getAllPositions"; private String METHOD_NAME = "getAllPositions"; private String NAMESPACE = "http://session/"; private static final String URL ="http://192.41.218.56:8080/WSGeoEAR-WSGeoServer/NavFinderBean?WSDL"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("idUtente",1); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL); androidHttpTransport.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); androidHttpTransport.debug = true; try{ androidHttpTransport.call(SOAP_ACTION, envelope); SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn; ArrayList<position> resultData = (ArrayList<position>)resultsRequestSOAP.getProperty("getAllPositionsResponse"); for(position p : resultData) { ((TextView)findViewById(R.id.lblStatus)).setText(p.getAllInformation()); } } catch(Exception E) { ((TextView)findViewById(R.id.lblStatus)).setText("ERROR:" + E.getClass().getName() + ": " + E.getMessage()); } } } I've also create a class position. It doesn't work,can someone help me?Thanks

    Read the article

  • DataTableReader is invalid for current DataTable 'TempTable'

    - by Sk93
    Hi, I'm getting the following error whenever my code creates a DataTableReader from a valid DataTable Object: "DataTableReader is invalid for current DataTable 'TempTable'." The thing is, if I reboot my machine, it works fine for an undertimed amount of time, then dies with the above. The code that throws this error could have been working fine for hours and then: bang. you get this error. It's not limited to one line either; it's every single location that a DataTableReader is used. Also, this error does NOT occur on the production web server - ever. This is an example of one of the lines where it falls over: If I step over this line, I get this: However, if I do this in the immediate window: I get no problems. Same goes if I actually use that line in the code. This has been driving me nuts for the best part of a week, and I've failed to find anything on Google that could help (as I'm pretty positive this isn't a coding issue). Some technical info: DEV Box: Vista 32bit (with all current windows updates) Visual Studio 2008 v9.0.30729.1 SP dotNet Framework 3.5 SP1 SQL Server: Microsoft SQL Server 2005 Standard Edition- 9.00.4035.00 (X64) Windows 2003 64bit (with all current windows updates) Web Server: Windows 2003 64bit (with all current windows updates) any help, ideas, or advice would be greatly appreciated! Cheers, Ian

    Read the article

  • Is is possible to populate a datatable using a Lambda expression(C#3.0)

    - by deepak.kumar.goyal
    I have a datatable. I am populating some values into that. e.g. DataTable dt =new DataTable(); dt.Columns.Add("Col1",typeof(int)); dt.Columns.Add("Col2",typeof(string)); dt.Columns.Add("Col3",typeof(DateTime)); dt.Columns.Add("Col4",typeof(bool)); for(int i=0;i< 10;i++) dt.Rows.Add(i,"String" + i.toString(),DateTime.Now,(i%2 == 0)?true:false); There is nothing wrong in this program and gives me the expected output. However, recently , I am learning Lambda and has done some basic knowledge. With that I was trying to do the same thing as under Enumerable.Range(0,9).Select(i = > { dt.Rows.Add(i,"String" + i.toString(),DateTime.Now,(i%2 == 0)?true:false); }); But I am unsuccessful. Is my approach correct(Yes I know that I am getting compile time error; since not enough knowledge on the subject so far)? Can we achieve this by the way I am doing is a big doubt(as I donot know.. just giving a shot). If so , can some one please help me in this regard. I am using C#3.0 and dotnet framework 3.5 Thanks

    Read the article

  • Serializing MDI Winforms for persistency

    - by Serge
    Hello, basically my project is an MDI Winform application where a user can customize the interface by adding various controls and changing the layout. I would like to be able to save the state of the application for each user. I have done quite a bit of searching and found these: http://stackoverflow.com/questions/2076259/how-to-auto-save-and-auto-load-all-properties-in-winforms-c http://stackoverflow.com/questions/1669522/c-save-winform-or-controls-to-file Basically from what I understand, the best approach is to serialize the data to XML, however winform controls are not serializable, so I would have use surrogate classes: http://www.codeproject.com/KB/dotnet/Surrogate_Serialization.aspx Now, do I need to write a surrogate class for each of my controls? I would need to write some sort of a recursive algorithm to save all my controls, what is the best approach to do accomplish that? How would I then restore all the windows, should I use the memento design pattern for that? If I want to implement multiple users later, should I use Nhibernate to store all the object data in a database? I am still trying to wrap my head around the problem and if anyone has any experience or advice I would greatly appreciate it, thanks.

    Read the article

  • Permission denied (maybe missing INTERNET permission) when calling web service

    - by Maxim
    I'm trying to use .net SOAP web service with ksoap2 lib. Example from http://www.vimeo.com/9633556 shows how to do it correct. Below the code from that example. everything shoud work ok, but when I try to do a call inself (httpTransport.call) I get "Permission denied (maybe missing INTERNET permission)" exception. Moreover, I don't see in the Application info window among permissions the internet permission alert. Tried this on emulator and Google phone. Will be very appreciated if somebody could help with it. Thanks. public void CelsiusToFahrenheit() { String SOAP_ACTION = "http://tempuri.org/CelsiusToFahrenheit"; String METHOD_NAME = "CelsiusToFahrenheit"; String NAMESPACE = "http://tempuri.org/"; String URL = "http://www.w3schools.com/webservices/tempconvert.asmx"; SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME); Request.addProperty("Celsius", "32"); SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); soapEnvelope.dotNet = true; soapEnvelope.setOutputSoapObject(Request); AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL); try { httpTransport.call(SOAP_ACTION, soapEnvelope); SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse(); res = resultString.toString(); } catch (Exception e) { e.printStackTrace(); } } AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest> <application> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <user-permission android:name="android.permission.INTERNET"></user-permission> <uses-sdk android:minSdkVersion="4" />

    Read the article

  • SerializationException with custom GenericIdentiy?

    - by MunkiPhD
    I'm trying to implement my own GenericIdentity implementation but keep receiving the following error when it attempts to load the views (I'm using asp.net MVC): System.Runtime.Serialization.SerializationException was unhandled by user code Message="Type is not resolved for member 'OpenIDExtendedIdentity,Training.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'." Source="WebDev.WebHost" I've ended up with the following class: [Serializable] public class OpenIDExtendedIdentity : GenericIdentity { private string _nickName; private int _userId; public OpenIDExtendedIdentity(String name, string nickName, int userId) : base(name, "OpenID") { _nickName = nickName; _userId = userId; } public string NickName { get { return _nickName; } } public int UserID { get { return _userId; } } } In my Global.asax I read a cookie's serialized value into a memory stream and then use that to create my OpenIDExtendedIdentity object. I ended up with this attempt at a solution after countless tries of various sorts. It works correctly up until the point where it attempts to render the views. What I'm essentially attempting to achieve is the ability to do the following (While using the default Role manager from asp.net): User.Identity.UserID User.Identity.NickName ... etc. I've listed some of the sources I've read in my attempt to get this resolved. Some people have reported a Cassini error, but it seems like others have had success implementing this type of custom functionality - thus a boggling of my mind. http://forums.asp.net/p/32497/161775.aspx http://ondotnet.com/pub/a/dotnet/2004/02/02/effectiveformsauth.html http://social.msdn.microsoft.com/Forums/en-US/netfxremoting/thread/e6767ae2-dfbf-445b-9139-93735f1a0f72

    Read the article

  • Disable proxy for entire application?

    - by Brent
    Ever since upgrading to Visual Studio 2010, I'm running into an issue where the first web request of any type (WebRequest, WebClient, etc.) hangs for about 20 seconds before completing. Subsequent calls work quickly. I've narrowed down the problem to a proxy issue. If I manually disable proxy settings, I don't experience this delay: Dim wrq As WebRequest = WebRequest.Create(Url) wrq.Proxy = Nothing What's strange is that there are no proxy settings enabled on this machine in Internet Options. What I'm wondering is if there is a way to disable proxy settings for my entire project in one shot without explicitly disabling as above for every web object. The main reason I want to be able to do this is that I'm trying to use an API (http://code.google.com/p/google-api-for-dotnet/) which uses web requests, but does not provide any way to manually disable proxy settings. I have found some information suggesting that I need to add some proxy information to the app.config file, but I get errors building my program if I make an edits to that file. Can anyone point me in the right direction?

    Read the article

  • CF - How to get mouse position when ContextMenu pops up ??

    - by no9
    I have a problem i cannot solve. In my view (that shows a map) i created a contextMenu. When context menu is invoked i need to get the position where the user has clicked on the map. Here is my problem: In the view i already have onMouseDown event that gets me the coordinates where the user clicked. private void MapView_MouseDown(object sender, MouseEventArgs e) { this.lastMouseDownX = e.X; this.lastMouseDownY = e.Y; } When the contextMenu is invoked i need the same data, but the problem is that contextMenu only has EventArgs that dont keep the data i need. Furthermore ... contextMenu is invoked when user presses and holds mouse for a second and when its invoked the code does not enter onMouseDown event ! It just goes into popup event on my context menu.... I tried putting this in my popup event, but the coordinates are not ok. Y coordinate is way off the chart. private void servicesContextMenu_Popup(object sender, EventArgs e) { this.lastMouseUpX = Control.MousePosition.X; this.lastMouseUpX = Control.MousePosition.Y; } I also tried this, but with no success ... the problem remains ... when contextMenu is invoked the code does not fire onMouseDown event. http://www.mofeel.net/58-microsoft-public-dotnet-framework-compactframework/19285.aspx Help?

    Read the article

  • How do you protect a common resource using mutexes?

    - by Steve
    I have a common resource, which I want 1 and only 1 instance of my application (or it's COM API) to have access to at any time. I have tried to protect this resource using mutexes, but when multiple threads of a host dotnet application try to access the COM object, the mutex doesn't seem to be released. This is the code I have used to protect my resource. repeat Mutex := CreateMutex(nil, True, PChar('Connections')); until (Mutex <> 0) and (GetLastError <> ERROR_ALREADY_EXISTS); try //use resource here! finally CloseHandle(Mutex); end; If I run the threads simultaneously, the first thread get's through (obviously, being the first one to create the mutex), but subsequent threads are caught in the repeat loop. If I run each thread at 5 second intervals, then all is ok. I suspect I'm not using mutexes correctly here, but I have found very little documentation about how to do this. Any ideas?

    Read the article

  • Advice on a DB that can be uploaded to a website by a smart client for collecting survey feedback

    - by absfabs
    Hello, I'm hoping you can help. I'm looking for a zero config multi-user datbase that my winforms application can easily upload to a webserver folder (together with 1 or 2 classic asp pages) and am looking for some suggestions/recommendations. The idea is that the database will be used to collect feedback entered by people filling in the asp pages. The pages will write to the database using javascript. The database will subsequently be downloaded again for processing once the responses are in. In Summary: It will mostly run in MS Windows environments. I have a modest budget for this and do not mind paying for such a database. No runtime licensing costs. Should be xcopy - Once uploaded to a website folder it should be operational. It should not have a dotnet CLR dependency. It should support a resonable level of concurrent access. Average respondent count would be around 20-30 but one never knows. Should be a reasonable size so that uploads/downloads to and from the site will be reasonably fast. Would appreciate your suggestions/comments Many thanks Abz To clarify - this is a desktop commercial application for feedback management in a vertical market. It uses SQL Server as the backing store. The application currently provides feedback management from email and paper feedback. I now want to add web feedback capability. Getting users to to make their SQL servers accessible to a website is not at option at this time as I am want to make getting up and running as painless as possible. I intend to release a web based implementation of the software in the near future but for now am looking at the above as a pragmatic way to provide web based feedback collection.

    Read the article

  • Regular Expression to replace a pattern at runtime(C#3.0)

    - by deepak.kumar.goyal
    I have a requirement. I have some files in a folder among which some file names looks like say **EUDataFiles20100503.txt, MigrateFiles20101006.txt.** Basically these are the files that I need to work upon. Now I have a config file where it is mentioned as the file pattern type as EUDataFilesYYYYMMDD, MigrateFilesYYYYMMDD. Basically the idea is that, the user can configure the file pattern and based on the pattern mentioned, I need to search for those files that are present in the folder. i.e. at runtime the YYYYMMDD will get replaced by the Year Month and Date Values. It does not matter what dates will be there(but not with time stamp ; only dates)). And the EUDataFiles or MigrateFiles names will be there.(they are fixed) i.e. If the folder has a file name as EUDataFile20100504.txt(i.e. Year 2010, Month 05, Day 04) , I should ignore this file as it is not EUDataFiles20100504.txt (kindly note that the name is plural - File(s) and not file for which the system will ignore the file). Similarly, if the Pattern given as EUDataFilesYYYYMMDD and if the file present is of type EUDataFilesYYYYDDMM then also the system should ignore. How can I solve this problem? Is it doable using regular expression(Replacing the pattern at runtime)? If so can anyone be good enough in helping me out? I am using C#3.0 and dotnet framework 3.5. Thanks

    Read the article

  • Error while reading custom configuration file(app.config)

    - by Newbie
    I am making a custom configuration in my winform application. (It will represent a country-corrency list) First the CountryList class namespace UtilityMethods { public class CountryList : ConfigurationSection { public CountryList() { // // TODO: Add constructor logic here // } [ConfigurationProperty("CountryCurrency", IsRequired = true)] public Hashtable CountryCurrencies { get { return CountryCurrency.GetCountryCurrency(); } } } } The GetCountryCurrency() method is defined in CountryCurrency class as under namespace UtilityMethods { public static class CountryCurrency { public static Hashtable GetCountryCurrency() { Hashtable ht = new Hashtable(); ht.Add("India", "Rupees"); ht.Add("USA", "Dollar"); return ht; } } } The app.config file looks like <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name ="CountryList1" type ="UtilityMethods.CountryList,CountryList,Version=2.0.0.0, Culture=neutral"/> </configSections> <appSettings /> </configuration> And I am calling this from a button_click's event as try { CountryList cList = ConfigurationManager.GetSection("CountryList") as CountryList; Hashtable ht = cList.CountryCurrencies; } catch (Exception ex) { string h = ex.Message; } Upon running the application and clicking on the button I am getting this error Could not load type 'UtilityMethods.CountryList' from assembly 'System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Please help (dotnet framework : 3.5 Language: C#)

    Read the article

  • Trapping messages in .NET

    - by user350632
    How can i trap a Windows system message (like WM_SETTEXT) that was sent by some window (VLC player window in my case)? I've tried to inherit NativeWindow class and override WndProc like this: class VLCFilter : NativeWindow { System.IntPtr iHandle; const int WM_SETTEXT = 0x000C; public VLCFilter() { Process p = Process.GetProcessesByName("vlc")[0]; iHandle = p.MainWindowHandle; } protected override void WndProc(ref Message aMessage) { base.WndProc(ref aMessage); if (aMessage.HWnd != iHandle) return false; if (aMessage.Msg == WM_SETTEXT) { MessageBox.Show("VLC window text changed!"); } } } I have checked with Microsoft Spy++ that WM_SETTEXT message is sent by VLC player but my code doesn't seem to get the work done. I've refered mainly to: http://www.codeproject.com/kb/dotnet/devicevolumemonitor.aspx I'm trying to make this work for some time with no success. What am I doing wrong? What I am not doing? Maybe there is easier way to do this? My initial goal is to catch when VLC player (that could be playing somewhere in the background and is not emmbed in my application) repeats its playback (have noticed that WM_SETTEXT message is sent then and I'm trying to find it out like this).

    Read the article

  • Calling web service from seems to hang

    - by anothershrubery
    I am trying to call an asmx web service from an Android app. Just literally started some Android development today. I've been following various solutions I have found on the net and on here and it seems it is more difficult than anticipated. I have tried various solutions and using KSoap2 seems to be the easiest way to implement this, well it would be if I could get it working. I have the following code which works up until a point: private class CallWebService extends AsyncTask<Void, Void, Void> { private static final String SOAP_ACTION = "http://tempuri.org/GetUser"; private static final String METHOD_NAME = "GetUser"; private static final String NAMESPACE = "http://tempuri.org/"; private static final String URL = "http://160.10.1.79:59315/Service1.asmx"; TextView tv; @Override protected Void doInBackground(Void... params) { tv=(TextView)findViewById(R.id.txtMessage); try { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); Object result = (Object)envelope.getResponse(); tv.setText(result.toString()); } catch (Exception e) { tv.setText(e.getMessage()); } return null; } } It seems to hang at the line androidHttpTransport.call(SOAP_ACTION, envelope); Any ideas why? Is this the correct approach? Should I be looking in another direction?

    Read the article

  • Pick up relevant information from a string using regular expression C#3.0

    - by Newbie
    Hi, I have a situation. I have been given some file name which can be like <filename>YYYYMMDD<fileextension> some valid file names that will satisfy the above pattern are as under xxx20100326.xls, xxx2v20100326.csv, x_20100326.xls, xy2z_abc_20100326_xyz.csv, abc.xyz.20100326.doc, ab2.v.20100326.doc, abc.v.20100326_xyz.xls In what ever be the above defined case, I need to pick up the dates only. So for all the cases, the output will be 20100326. I am trying to achieve the same but no luck. Here is what I have done so far string testdata = "x2v20100326.csv"; string strYYYY = @"\d{4}"; string strMM = @"(1[0-2]|0[1-9])"; string strDD = @"(3[0-1]|[1-2][0-9]|0[1-9])"; string regExPattern = @"\A" + strYYYY + strMM + strDD + @"\Z"; Regex regex = new Regex(regExPattern); Match match = regex.Match(testdata); if (match.Success) { string result = match.Groups[0].Value; } I am using c#3.0 and dotnet framework 3.5 Please help. It is very urgent Thanks in advance.

    Read the article

  • C# form - checkboxes do not respond to plus/minus keys - easy workaround?

    - by Scott
    On forms created with pre dotNET VB and C++ (MFC), a checkbox control responded to the plus/minus key without custom programming. When focus was on the checbox control, pressing PLUS would check the box, no matter what the previous state (checked/unchecked), while pressing MINUS would uncheck it, no matter the previous state. C# winform checkboxes do not seem to exhibit this behavior. Said behavior was very, very handy for automation, whereby the automating program would set focus to a checkbox control and issue a PLUS or MINUS to check or uncheck it. Without this capability, that cannot be done, as the automation program (at least the one I am using) is unable to query the current state of the checkbox (so it can decide whether to issue a SPACE key to toggle the state to the desired one). I've gone over the properties of a checkbox in the Visual Studio 2008 IDE and could not find anything that would restore/enable response to PLUS/MINUS. Since I am in control of the sourcecode for the WinForms in question, I could replace all checkbox controls with a custom checkbox control, but blech, I'd like to avoid that - heck, I don't think I could even consider that given the amount of refactoring that would need to be done. So the bottom line is: does anyone know of a way to get this behavior back more easily than a coding change?

    Read the article

  • Red Gate in the Community

    - by Nick Harrison
    Much has been said recently about Red Gate's community involvement and commitment to the DotNet community. Much of this has been unduly negative. Before you start throwing stones and spewing obscenities, consider some additional facts: Red Gate's software is actually very good. I have worked on many projects where Red Gate's software was instrumental in finishing successfully. Red Gate is VERY good to the community. I have spoken at many user groups and code camps where Red Gate has been a sponsor. Red Gate consistently offers up money to pay for the venue or food, and they will often give away licenses as door prizes. There are many such community events that would not take place without Red Gate's support. All I have ever seen them ask for is to have their products mentioned or be listed as a sponsor. They don't insist on anyone following a specific script. They don't monitor how their products are showcased. They let their products speak for themselves. Red Gate sponsors the Simple Talk web site. I publish there regularly. Red Gate has never exerted editorial pressure on me. No one has ever told me we can't publish this unless you mention Red Gate products. No one has ever said, you need to say nice things about Red Gate products in order to be published. They have told me, "you need to make this less academic, so you don't alienate too many readers. "You need to actually write an introduction so people will know what you are talking about". "You need to write this so that someone who isn't a reflection nut will follow what you are trying to say." In short, they have been good editors worried about the quality of the content and what the readers are likely to be interested in. For me personally, Red Gate and Simple Talk have both been excellent to work with. As for the developer outrage… I am a little embarrassed by so much of the response that I am seeing. So much of the complaints remind me of little children whining "but you promised" Semantics aside. A promise is just a promise. It's not like they "pinky sweared". Sadly no amount name calling or "double dog daring" will change the economics of the situation. Red Gate is not a multibillion dollar corporation. They are a mid size company doing the best they can. Without a doubt, their pockets are not as deep as Microsoft's. I honestly believe that they did try to make the "freemium" model work. Sadly it did not. I have no doubt that they intended for it to work and that they tried to make it work. I also have no doubt that they labored over making this decision. This could not have been an easy decision to make. Many people are gleefully proclaiming a massive backlash against Red Gate swearing off their wonderful products and promising to bash them at every opportunity from now on. This is childish behavior that does not represent professionals. This type of behavior is more in line with bullies in the school yard than professionals in a professional community. Now for my own prediction… This back lash against Red Gate is not likely to last very long. We will all realize that we still need their products. We may look around for alternatives, but realize that they really do have the best in class for every product that they produce, and that they really are not exorbitantly priced. We will see them sponsoring Code Camps and User Groups and be reminded, "hey this isn't such a bad company". On the other hand, software shops like Red Gate, will remember this back lash and give a second thought to supporting open source projects. They will worry about getting involved when an individual wants to turn over control for a product that they developed but can no longer support alone. Who wants to run the risk of not being able to follow through on their best intentions. In the end we may all suffer, even the toddlers among us throwing the temper tantrum, "BUT YOU PROMISED!" Disclaimer Before anyone asks or jumps to conclusions, I do not get paid by Red Gate to say any of this. I have often written about their products, and I have long thought that they are a wonderful company with amazing products. If they ever open an office in the SE United States, I will be one of the first to apply.

    Read the article

  • On Reflector Pricing

    - by Nick Harrison
    I have heard a lot of outrage over Red Gate's decision to charge for Reflector. In the interest of full disclosure, I am a fan of Red Gate. I have worked with them on several usability tests. They also sponsor Simple Talk where I publish articles. They are a good company. I am also a BIG fan of Reflector. I have used it since Lutz originally released it. I have written my own add-ins. I have written code to host reflector and use its object model in my own code. Reflector is a beautiful tool. The care that Lutz took to incorporate extensibility is amazing. I have never had difficulty convincing my fellow developers that it is a wonderful tool. Almost always, once anyone sees it in action, it becomes their favorite tool. This wide spread adoption and usability has made it an icon and pivotal pillar in the DotNet community. Even folks with the attitude that if it did not come out of Redmond then it must not be any good, still love it. It is ironic to hear everyone clamoring for it to be released as open source. Reflector was never open source, it was free, but you never were able to peruse the source code and contribute your own changes. You could not even use Reflector to view the source code. From the very beginning, it was never anyone's intention for just anyone to examine the source code and make their own contributions aside from the add-in model. Lutz chose to hand over the reins to Red Gate because he believed that they would be able to build on his original vision and keep the product viable and effective. He did not choose to make it open source, hoping that the community would be up to the challenge. The simplicity and elegance may well have been lost with the "design by committee" nature of open source. Despite being a wonderful and beloved tool, Reflector cannot be an easy tool to maintain. Maybe because it is so wonderful and beloved, it is even more difficult to maintain. At any rate, we have high expectations. Reflector must continue to be able to reasonably disassemble every language construct that the framework and core languages dream up. We want it to be fast, and we also want it to continue to be simple to use. No small order. Red Gate tried to keep the core product free. Sadly there was not enough interest in the Pro version to subsidize the rest of the expenses. $35 is a reasonable cost, more than reasonable. I have read the blog posts and forum posts complaining about the time associated with getting the expense approved. I have heard people complain about the cost being unreasonable if you are a developer from certain countries. Let's do the math. How much of a productivity boost is Reflector? How many hours do you think it saves you in a typical project? The next question is a little easier if you are a contractor or a consultant, but what is your hourly rate? If you are not a contractor, you can probably figure out an hourly rate. How long does it take to get a return on your investment? The value added proposition is not a difficult one to make. I have read people clamoring that Red Gate sucks and is evil. They complain about broken promises and conflicts of interest. Relax! Red Gate is not evil. The world is not coming to an end. The sun will come up tomorrow. I am sure that Red Gate will come up with options for volume licensing or site licensing for companies that want to get a licensed copy for their entire team. Don't panic, and I am sure that many great improvements are on the horizon. Switching the UI to WPF and including a tabbed interface opens up lots of possibilities.

    Read the article

  • System.ServiceModel.Syndication.SyndicationFeed throws when the RSS document includes a <script> blo

    - by Cheeso
    The code: using (XmlReader xmlr = XmlReader.Create(new StringReader(allXml))) { var items = from item in SyndicationFeed.Load(xmlr).Items select item; } The exception: Exception: System.Xml.XmlException: Unexpected node type Element. ReadElementString method can only be called on elements with simple or empty content. Line 11, position 25. at System.Xml.XmlReader.ReadElementString() at System.ServiceModel.Syndication.Rss20FeedFormatter.ReadXml(XmlReader reader, SyndicationFeed result) at System.ServiceModel.Syndication.Rss20FeedFormatter.ReadFeed(XmlReader reader) at System.ServiceModel.Syndication.Rss20FeedFormatter.ReadFrom(XmlReader reader) at System.ServiceModel.Syndication.SyndicationFeed.Load[TSyndicationFeed](XmlReader reader) at System.ServiceModel.Syndication.SyndicationFeed.Load(XmlReader reader) at Ionic.ToolsAndTests.ReadRss.Run() in c:\dev\dotnet\ReadRss.cs:line 90 The XML content: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/styles/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" > <channel> <title>Software architecture, software engineering, and Renaissance Jazz</title> <link>https://www.ibm.com/developerworks/mydeveloperworks/blogs/gradybooch</link> <atom:link rel="self" type="application/rss+xml" href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/gradybooch/feed/entries/rss?lang=en" /> <description>Software architecture, software engineering, and Renaissance Jazz</description> <language>en-us</language> <copyright>Copyright <script type='text/javascript'> document.write(blogsDate.date.localize (1273534889181));</script></copyright> <lastBuildDate>Mon, 10 May 2010 19:41:29 -0400</lastBuildDate> As you can see, on line 11, at position 25, there's a script block inside the <copyright> element. Other people have reported similar errors with other XML documents. The way I worked around this was to do a StreamReader.ReadToEnd, then do Regex.Replace on the result of that to yank out the script block, before passing the modified string to XmlReader.Create(). Feels like a hack. Has anyone got a better approach? I don't like this because I have to read in a 125k string into memory. Is it valid rss to include "complex content" like that - a script block inside an element?

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19  | Next Page >