Jump to content
Xtreme .Net Talk

ombun2

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by ombun2

  1. Hi, maybe this is very routine question, but I figured I'd ask: a web service is basically intended to act as an interfaceless-communication device between two applications. However for testing purposes there is also an HTML interface. I'm curious in how to disable that so users can't really seen anything about the program by typing that into their web browsers. Ty
  2. I'm not really a programmer by profession...I just do projects when I need to accomplish a function...for example, I've worked with a datagrid/SQL combo, and I'd have 'some idea' about how to answer about half the questions on those topics on this forum...however I've never used the Web/FTP classes before...since you've not acknowledged my proposed solution of this being 'networking programming' am I to assume that they are something that simply doesn't deal with any of the sockets/ports/protocols issues, and just does basic stuff - so a book on networking would be overkill? I could search on this further by myself, but I'd really appreciate just a link to some code or book, because I'm not sure quite yet...I don't mean to nag...thanks for your help so far
  3. I have to write a .net windows app that will basically function pretty much as a cheap download manager...i have to embed some links into the program itself and feed them to the user so that he can download them...my main concern for doing this is that I don't want users scrolling down my site and just plugging all the links into download managers...sitting back, while my site cringes in excruciating pain...this way i can feed it to them one link at a time, preserving the bandwidth, and at the same time hideing the links so that they will not be able to manually enter them into download accelerators. I don't really know how to handle the connection to the web site...i'm not going to be using a web service since i don't want any interprogram communication...i just want the program to download any link that i feed to it. My question is...under what category of programming does that fit? I need to buy some books, and learn some materials before I go on, and I want to know in which direction to head...is it network programming? do you think that any of these books will help me? http://www.amazon.com/exec/obidos/search-handle-url/ref=br_ss_hs/002-8279528-0529607?platform=gurupa&url=index%3Dstripbooks%3Arelevance-above%26dispatch%3Dsearch%26results-process%3Dbin&field-keywords=.net+networking&Go.x=0&Go.y=0&Go=Go
  4. For my app, I am using Integrated Windows Authentication in IIS. Just to be detailed enough...when a user types the url insead of getting a login page, he gets a windows dialog box with 3 options...username, password, and a checkbox to use password manager to remember the password. If a user would just type in the username and password, use the program, and close the browser, the next user on the same computer who would open a browser and go to the page would get the login box again...which is the desired result, especially if that person is a different user. Now if a user selects the checkbox to remember the password, as soon as ANYBODY goes to that page on the SAME computer the login dialog box will be bypassed and the page automatically appear. My question is how to programatically (especially in .NET) clear the cache for windows, so that it does not remember a passoword between browser openings...basically how do I create a log off button for Integrated Windows Authentication? I realize that in my web app I will have to manipulate Windows itself, but assuming that the permissions are not a problem how would I do that? This seems to me to be an integral part of any Web App that uses Integrated Windows Authentication, though I haven't found any answers relating to this so far... Thank you very much!
  5. Hi there, I host a site on which a lot of material is downloaded daily and I need to block download managers such as GetRight or Download Accelerator. I was just wondering if any of you have done something like this before, and knows how the best way to do it would be (either codewise: (positive) such as allowing only IE or Firefox, or (negative) stopping sessions with multiple threads, or some settings somewhere)
  6. oh, obviously you should have DataGrid2.EditItemIndex = e.Item.ItemIndex beforehand
  7. put this in DataGrid2_EditCommand the first line is really what you need but i've included the others just so you can see how to handle diffrent parts of the grid DataGrid2.Items(DataGrid2.EditItemIndex).BackColor = Color.Azure CType(DataGrid2.Items(DataGrid2.EditItemIndex).Cells(3).Controls(0), TextBox).Enabled = False DataGrid2.Items(DataGrid2.EditItemIndex).Cells(3).BackColor = Color.Black hope this helps
  8. just to complete what i said, I guess i was trying to point out the difference between IIS Integrated Windows Authentication and ASP.Net Windows authentication. After IIS authentication (Anonymous, Basic, Digest, Integrated Windows) ASP.Net also has 4 "authentication" modes (None, Windows, Forms, and Passport) The reason I put the ASP.NET "authentication" modes in quotes is because I believe that only the last 2 actually do authentication because in order to use them one had to put IIS authentication to anonymous. ASP.NET "None" and "Windows" actually have more to do with AUTHORIZATION, and which accounts are allowed access to what resources, however the AUTHENTICATION part comes from IIS.
  9. maybe i'm just tired. not thinking straight and i've got this all wrong, but isn't this an IIS issue instead of an asp.net issue? Sine this isn't using forms authentication (IIS set to anonymous) then this logon prompt comes from IIS not the application. Espcially that thing with the limiting the 3 errors to just one...can one solve this by creating a GPO and playing with ComputerConfiguration -> WindowsSettings -> security settings -> account policies -> (account lockout policy and account lockout duration)...even if not this way, isn't this a windows issue instead of a app issue? it sound fishy, but i'm really curious what others think
  10. i've just skimmed through your code but in case this helps you here is an example using sql instead of ole. I know that this code works at least and will update the database. Dim Key As String = DataGrid2.DataKeys(e.Item.ItemIndex).ToString() Dim Command As String = "DELETE Assets WHERE AssetID = " & Key Dim objComm As New SqlClient.SqlCommand() SqlConnection1.Open() objComm.Connection = SqlConnection1 objComm.CommandText = Command objComm.ExecuteNonQuery() SqlConnection1.Close() yeah, boy was I ever surprised when I've put delete columns, select columns, page navigation, etc on a datagrid and nothing happened when I clicked them...then I realized that even this monster control won't write the code for me...especially when it comes to updating it's some really freaky stuff and this is why especially... most often we load data from a database into a dataset with multiple tables...from that we create a dataview, and that is what we bind to the datagrid, so we have 3 layers between the edit button and the database, how does one associate what happens on the grid with the record that should be edited in the database. this is where a little unknown fact comes in: the datagrid.datakeyfield which when set to the primary key will create a mapping that will allow us to retrieve the primary key for the selected row by using something like Dim Key As String = DataGrid2.DataKeys(e.Item.ItemIndex).ToString() from then on it should be easy. now there are different methods to update the grid...the one above is one where you do all the work and define the string as opposed to commandbuiler objects and adapter.update statements, but I can't see why anybody would not want to use this...it just gives one so much control over what happens... i hope at least some of this helped
  11. yeah, menus are client-side events (something must happen without doing a post-back) so some form of scripting service should be used. for non-profit organizations these guys http://milonic.com/ let you use their menus...but whatever the case you can look and learn from their examples hope this helps
  12. yeah, referring to what PlausiblyDamp said, set your dv.RowFilter property to a string such as AssetID LIKE '*0*' AND EmployeeID LIKE '*1*' AND DepartmentID LIKE '*3*' that creates a filter where the values in the columns must CONTAIN (even more powerful than EQUAL) the values '0' '1' and '3' you can create some really powerful stuff...to read more about this, in your VS.NET index type this exactly "DataColumn.Expression property" however be careful where those values that you're searching for come from. If it's all done programatically, it's ok, but if you accept text from the user VALIDATE it 1000 times before you pass it to your database. Read up more on SQL Injection Attacks...freaky stuff.
  13. just skimming through your question...what are you writing your code in?: Visual Studio.Net? Starting a new ASP.NET project in that putting a label on the form and setting the text to something in the page load, should DEFINITELY work there. What caught my eye in what you wrote however was "but I can't DEBUG ASP.NET web application so it is kind of hard" Do you mean that when you press F5 you get errors of some kind, even for a blank new app? I've had this problem before, I've installed several insances of VS.Net and I've noticed that on WinXP(i don't know about other OSs) it would give me such an error. I've uninstalled it and reinstalled it several times until i've just got angry and uninstalled absolutely everything related to .net (including the framework) that came with windows. After that I installed VS.NEt again, this time letting it install it's own copy of the framework and everything was handydandy. Your problem seems to be too simple to be some programming mistake so I think it might be some M$ thingie. hope it helped
  14. right now i can't offer too detailed help but maybe i can make some suggestions that might help you... you said "except when the record is edited, the new values don't show up in the database." do you mean that they don't show up in the database or that they don't show up in the control after you update the info. i think you might have mean the latter, but you might have stumbled unto the acutal problem...are you sure that your changes even got to the database...did you open it up and check that they're there? just skimming over your code, i only used sql commands and not ole, but in case your update code doesn't work you can skim this over and hopefully it'll help you - i know that it works Dim Key As String = DataGrid2.DataKeys(e.Item.ItemIndex).ToString() Dim Command As String = "DELETE Assets WHERE AssetID = " & Key Dim objComm As New SqlClient.SqlCommand() SqlConnection1.Open() objComm.Connection = SqlConnection1 objComm.CommandText = Command objComm.ExecuteNonQuery() SqlConnection1.Close()
  15. what i had to do once was how to call client-side code for server side events a function that i found somewhere goes with Public Shared Sub OpenNewWindow(ByVal Opener As System.Web.UI.WebControls.WebControl, ByVal PagePath As String) Dim Clientscript As String Dim Desc As String = "Details" Dim misc As String = "width=720,height=830,resizable,scrollbars=yes,menubar=yes" Clientscript = "window.open('" & PagePath & "', '" & Desc & "', '" & misc & "')" Opener.Attributes.Add("Onclick", Clientscript) End Sub you'd call this function by using something like OpenNewWindow(CType(DataGrid2.Items(temp).Cells(0).Controls(0), LinkButton), "webform2.aspx?data=34343") and what all that would do is to assign a client side code to that control so that it will be activated from the client-side the next time it was pressed...so referring to your question...read up on the window.open properites...a good page for this is http://64.233.161.104/search?q=cache:8bBcvavMZ8wJ:www.mozilla.org/docs/dom/domref/dom_window_ref76.html+window.open&hl=en
  16. Read up on the <location> section. I can't recall all the details right now, but you'd create a <location> section with <system.web> and <authorization> subsections for each secure page in your app. you indicate the page by using the "path" attribute in your <location> marker. you can have multiple <location> sections and you'd put them in between the <configuration> markers of your web.config file. in order to process these special pages first I think you have to put them before the default <system.web> that's already in the file. so something like this <configuration> <location path="food.aspx"> <system.web> <authorization> ~~!@@ </authorization> </system.web> </location> <location path="games.aspx"> <system.web> <authorization> ~~!@@ </authorization> </system.web> </location> <system.web> <authorization> </authorization> </system.web> </configuration> success (oh great i indented but it won't show...oh well)
  17. The reason it might not work for you is because you have the AutoGenerateColumns of your DataGrid set to true. That will cause columns to show, but when you try to index them you'll get an index error. For example by using the property builder and adding a select, delete, and edit column and doing a datagrid.columns.count you'll see that it only returns 3 colums. what works for me is just using the property builder and adding them manually, then they will all be accessible to indexing
  18. true type fonts (as most are today) are unevenly spaced so that they will look nicer according to whatever rules they were created. On the other hand monotype fonts such as courier new have a fixed length for each character (as was on a typewriter block)
×
×
  • Create New...