Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. If the router is forwarding the port the server application is listening on to the correct internal ip / port combination then you should be able to get a client to connect to it. Are these applications talking over the internet or just over an internal router? If you are connecting over the internet which router(s) have you configured and how? The router between the client and the internet / isp should simply allow outbound communications on the specified port. The router at the server side should forward the listening port to the correct internal ip address.
  2. If you are binding to a DataSet / DataTable then you will need to refresh it's contents after you have updated the DB as the Dataset does not maintain a connection to the DB it cannot automatically update itself. Just use the same dataadapter.Fill you used to populate the datatable originally.
  3. Shouldn't you be using DeleteObject to release the object created by SelectObject? If you check the return value of DeleteDC it should be zero - any non-zero value indicates failure.
  4. Is the application failing to connect correctly when using port forwarding? If so does it work correctly when the two PCs are on the same network segment? You need to be careful when treating ports as absolute end-points with monitoring tools as they don't work as it would first appear. Is the client application appearing to connect to the correct port but from a different port? If so that is perfectly normal - the assigned port number is for the destination to listen on and it doesn't require the client to also be using the same number.
  5. Is this for a windows or web application? Could you clarify what you mean by are you getting errors at compile time or runtime - what are the errors? Also if you are using C# then Chr won't work as that is a VB keyword.
  6. Although the variables are declared outside the while loop they are only ever assigned to inside the while loop. More importantly the compiler cannot guarantee the code in the loop will ever execute (the adapter might return no records for example) so it cannot be sure the variables will ever be assigned to. Easiest fix is to assign something to them when you declare them (even assigning null will work) so the compiler knows they have been initialised to something.
  7. You will also need to define an appropriate InsertCommand, UpdateCommand and DeleteCommand for the DataAdapter, then use the DA.Update(...) method to push the changes back to the DB.
  8. Depends on the service - is it one you have written or an already existing one?
  9. Dim sb As new System.Text.StringBuilder ' this line gives an error since ReadAllText returns a STRING sb.Append(My.Computer.FileSystem.ReadAllText("c:\data\file1.txt"))
  10. Something like name="ExampleConnectionString" connectionString="your connection string here" providerName="System.Data.SqlClient" /> defaultProviderAspNetSqlRoleProvider"> name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> defaultProvider="AspNetSqlMembershipProvider"> name=" AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ExampleConnectionString" /> not tested it (it's a hacked version of one I have used - names removed etc)
  11. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ASPNETProvMod_Intro.asp is worth a read through as it covers the relevant sections of web.config and the appropriate values.
  12. You could always use Array.Sort to sort an array if you do not want to go to an ArrayList...
  13. If you are developing a windows forms application then you will not need to be using session variables as these are a web concept anyway. As a starting point you might want to investigate the GenericIdentity and GenericPrinciple classes in the framework - these will make a good starting point for a user / group based security mechanism.
  14. The default implementation stores them inside a SQLExpress database, if you want to use the default schema but on another DB then the utility aspnet_regsql.exe can be used to configure a given SQL server. If you do this you will need to alter the web.config to point to the new DB. If you wish to use a different security mechanism then you would need to create your own RoleProvider and MembershipProvider classes by inheriting from the ones provided in System.Web.Security (or near there anyway).
  15. Right click on the properties windows and ensure Description is ticked.
  16. Or, at the risk of sounding like a stuck record, if you had used a parameterised query rather than relying on string concatenation this wouldn't have been a problem. String concatenation is an error prone and insecure way to do SQL.
  17. Not 100% sure and haven't got VS handy to test it but I think the ProductGT11 method should look like Private Shared Function ProductGT11(ByVal p As String) As Boolean
  18. Are you referencing the dll output from Project A in Project C? If so are you sure you a referencing the correct file - if you remove the reference and then re-create it does that help? Also have you tried adding Project A to Solution 2 and setting the reference up that way?
  19. It might help if you gave some more specifics - is this a web or windows application (posting questions in the correct place helps). What version of .Net is this being developed on? Do you currently have any existing security model or are you going to be designing everything from scratch?
  20. The variable BTW is declared as double but the parameter is a float - change it to float and you should be fine for those 2 lines. You will also need to modify the double.TryParse(cmbBTW.Text, out BTW) to use float.Parse to get a clean compile.
  21. SQLExpress is installed as a named instance rather than as a default instance.
  22. try esp\sqlexpress for the server name
  23. Is there a possibility that a given XML file can be opened a 2nd (or 3rd) time by the external process? If so your code introduces a race condition i.e. :retry_loop check file if not free goto retry_loop //external program could reopen file here! open file you might be better just trying the doc.Load(...) within the try section and keep looping till it works. Also exceptions are quite expensive in terms of performance as is doing a 'busy loop' like your code - you might want to drop a delay of a couple of seconds after a failure before retrying.
  24. You can add it as a reference to a project and treat it like a .Net library.
  25. http://newmedia.northatlantic.nf.ca/multimed/source/techspec/activex.htm gives a brief overview of activex controls and how to use them in IE. Creating an ActiveX control can be a difficult job depending on your language choice (C# doesn't have any built in support for this) though.
×
×
  • Create New...