|
Read this[^]
"Need Help" is not very good subject line and is probably the reason your question has been ignored.
only two letters away from being an asset
|
|
|
|
|
amarnath n.n wrote: 1. Does anyone know how efficient Response.TransmitFile is? I can see that it doesn't add up the memory usage to IIS at all, but I'm not sure the impact on the server itself compared with reading and writing to a buffer in chunks.
AFAIK, Response.TransmitFile directly writes the file in the Response stream, which is similar to reading and writing chunks to a buffer. It flushes the buffer once the file is written to the output stream.
amarnath n.n wrote: 2. What about security? by using Response.TransmitFile
There is no relation of Security with this. Its actually reading the file from a specified physical location of the server and writes the file directly to the stream. If asp.net user has permission to that folder, it can transmit the file properly.
|
|
|
|
|
I never had to use Response.TransmitFile . IMO, simple method to transmit files is to redirect to the file name. Rest all will be automatically taken care.
|
|
|
|
|
You are assuming that the file is in the folder structure. Many, store files out of the folder structure of the website so they can be properly secured on a user to user basis.
|
|
|
|
|
Hello,
I have created a web user control and that contain a javascript method that check for required field. if there is a required filed not filled it return an alert. the problem is that the page post back not in the control pageload but the page that contain that control. how can i prevent from post back when a special field is required.
regards.
dghdfghdfghdfghdgh
|
|
|
|
|
To call a javascript function prior to postback, take the button out of the form. Use the button to call javascript, and if everything is ok, use the javascript to call form.submit().
Rob
http://tagyurit.com
r
|
|
|
|
|
use
onclick = "return yourfunction()"
Now from the function return false when you show the alert, the page will then not be posted back.
function yourfunction()
{
if ...
{
alert('invalid');
return false;
}
return true;
}
|
|
|
|
|
Hi.
Hoping you guys can help me, and more importantly, the message I'm typing actually conveys my problem. I've come across a few forums where guys having my same problem, being answered in the way we don't want to.
My intranet website currently uses session variables and cookies to authenticate user. I would like to use the Active Directory login details of the user to gain access to the intranet. Now, to gain access to a PC, a user needs to login using his AD un and pwd, so surely the logged on user should be known somewhere.
So instead of using sessions and cookies, I want the user currently logged details, and directly log on to my intranet website. So I don't need to prompt the user again for details.
I think a step in the right direction would be to at least get the logged on user.
System.DirectoryServices DirectoryEntry and -Searcher doesn't really get you the logged on user. You can use these to search and add entries, but ya, they still don't provide me with the currently logged on user.
Going to IIS and Disabling anonymous access, and setting Integrated security. Kinda helps, but then my users still get prompted for a username and password. And yaaa, once again, I don't want that pop-up, because the user already needed to logon to the PC using his/her AD details, why can't IIS just use that.
And Lastly.
WindowsPricipal and Context.User.Identity.Name.... well, they only get set once the user logs in on that IIS popup I mentioned early, or simply not display anything when anonymous access is allowed.
I guess a short version is...
How do I plug my intranet into my active directory, without prompting the user for details again.
Hope my problem is stated clearly.
Thanks
|
|
|
|
|
Is your client, web server, and active directory server all on the same domain (or at least trusted among multiple domains)? This is a must in order to get authentication to work seamlessly.
rob
http://tagyurit.com
|
|
|
|
|
Try this for getting currently logged user name..
private string GetCurrentLoggedUser()
{
return System.Environment.UserName.ToString();
}
System.Environment.UserName - It return the logged user on the target OS.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
I have my intranet working just like that and use Context.User.Identity.Name to get the Domain\Username of the person accessing without pop ups.
There's 2 things I can think of that you need to do (since you already enabled integrated security)
1. As the person before said, the server must be in the same domain
2. The users need to have read access to the files by virtue of AD... in my case, I have a security group with all my users that is also a user in the server. if I remove these permissions from a particular app folder then I get the pop up asking for name and password.
hope it helps
|
|
|
|
|
Hi.
1. Very good point. My server isn't on the same domain. I do have a development test server that is on the same domain, I'll have to try the concept on that server.
2. I'm gonna rephrase the suggestion you're giving in point 2 just to see whether I understand you. And I'll also point out which parts aren't clear to me. By "users having read access...by AD", does this mean I need to setup/allow read access to all users via the normal right-click folder-> Security -> allow read etc. Or perhaps a security group in AD itself. I think the first suggestion is the correct one.
Thanks guys. I'll give these suggestions a shot. I won't mark this as completed yet.
I don't wanna through you guys too much off track. My intranet actually leverages off VBscript. But trying to get (below) to work is even more of a challenge. Even after registering the proper COM components. Arrgh.
But I'll give .Net a run and see how that goes.
set sysInfo = CreateObject("ADSystemInfo")
Response.Write(sysInfo.Name)
|
|
|
|
|
I've found this article [Windows support]
There's a very interesting section briefly explain the problem I'm receiving.
Integrated Windows authentication
Integrated Windows authentication is more secure than basic authentication and it functions well in an Intranet environment where users have Windows domain accounts. In integrated Windows authentication, the browser attempts to use the current user's credentials from a domain logon and if this fails, the user is prompted to enter a user name and password. If you use integrated Windows authentication, the user's password is not transmitted to the server. If the user has logged on to the local computer as a domain user, the user does not have to authenticate again when the user accesses a network computer in that domain.
NOTE: You cannot use integrated Windows authentication through a proxy server.
But as you can see, no real explanation of why it wouldn't get the user's domain logon. Or what needs to be done to allow the browser to get the domain logon
|
|
|
|
|
Hi guys.
I'm still unable to avoid the popup when trying to gain access. I've got security groups setup for myself on the directory and files required.
Also my AD server, users and PC are on the same AD domain.
I'm really unable to determine what it is that needs to be done in order to get this issue sorted out.
|
|
|
|
|
Hi,
Can anybody tell me , why IIS 5.1 gives The operation has timed out for a simple Web request to the Web service deployed in it ?
Can i know about different scenario's in which this exception occurs except the File upload and download cases.
My web service start working after performing iisreset untill it wouldn't worked at all.
Regards
Datta.
|
|
|
|
|
Try to restart IIS ..! It is due to the connection leak some times !
If It Helps Click It as Answer
|
|
|
|
|
The Case is whenever you request IIS, it spawns a new thread from the Threadpool, generates the output and returns it back. Somehow in the middle I think it cant generate the response properly. This happens when there is memory leaks or ThreadPool is full. Try to handle your memory properly in your code and also If possible create a separate Application pool for this site.
Restarting IIS will clear the Application Pool area and thus the site comes alive again.
|
|
|
|
|
Hi guys,
Can anyone tell me where i can download sample codes showing how to host remotable server objects in an ASP.net 2.0 application.
Thanks in advance.
|
|
|
|
|
This [^]may give you a head start.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I have a treeview in my master page which is populated from database and its items (nodes) depends on the logged in user.
How can I minimize the database hits that may happen on page navigation. I believe caching is the solution for that. Will fragment caching help in minimizing the treeview binding since it is different from user to user?
Is there a way to persist the value of the control between page redirections?
|
|
|
|
|
|
Hi there!
I am having difficulty in deleting a row from a gridview. I would like to delete a row of data in a gridview using checkbox but at the same time would not delete that data from the database. I have tried using deleteRow method but am still struggling. Is there a work-around solution for this?
BtnDelete Method
Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click
If Not IsPostBack Then
Dim Row2 As GridViewRow
Dim rowCell As String = ""
Dim count As Integer = 0
Dim test As Integer = 0
Try
For Each row As GridViewRow In GridView1.Rows
Dim checkBxText As String = CType(row.FindControl("chkDelete"), CheckBox).Text
Row2 = GridView1.Rows(count)
rowCell = Row2.Cells(2).Text
Dim cb As CheckBox = DirectCast(row.FindControl("chkDelete"), CheckBox)
If cb.Checked Then
Try
'GridView1.Row(row.RowIndex).Delete()
MsgBox(row.RowIndex)
GridView1.DeleteRow(row.RowIndex)
Catch ex As Exception
'MsgBox(count)
GridView1.DataBind()
End Try
Else
End If
count += 1
'DataBind()
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
'BindData(idSelection)
End Sub
Private Sub ToggleCheckState(ByVal checkState As Boolean)
For Each row As GridViewRow In GridView1.Rows
Dim cb As CheckBox = row.FindControl("chkDelete")
If cb IsNot Nothing Then
cb.Checked = checkState
End If
Next
End Sub
|
|
|
|
|
Have you tried deleting the row from the datatable you bounded the grid and don't save the datatable to the database back. just after delting the data from thedatatable rebind the grid.
|
|
|
|
|
I think you can simply use datatable for your table manipulation in disconnected environment.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Hi,
I have a generic list with the following collection
Name
Age
ID
Count
Mark
How can i remove the items with age=10
Thankyou
YPKI
|
|
|
|