|
It looks like a hardware problem, are you sure that hard ware is correct?
be a part of the solution, rather then problem
|
|
|
|
|
Yes Hardware Is ok.
Even i am run application using real ip address from my pC.it's Work fine But If Some One Access Application From Remote PC.The Port Number disable Permanently. Now if i Restart my Machine All Works Fine Again.
So i not think this Hardware Problem they may be security problem but not exact know.
Thanks for answer.
http://webaspdotnet.blogspot.com/
|
|
|
|
|
I've been digging to find out how well the professional addons for visual studio 2008 work for integration with office, and I've come up with nothing.
I'd appreciate any information, opinions or experience, but specifically I'd like to know if it's capable of generating older excel documents and functions in .net 2.0.
Thanks for any answers guys
|
|
|
|
|
I have done Paging with Page number links and Previous Next Links like( Prev 1 2 3 4 Next )in Repeater.And it workd fine.But I want to avoid Javascript and create this links(Paging).
|
|
|
|
|
Hi Guys,
I need your help I have forms authentication setup on an asp.net portal. Even though I have the auth ticket to "NOT" persist, it does so after closing the browser... I have tried all the tricks with FormsAuthentication.SignOut() but still no cure.
Is there a way I could get rid of the forms auth cookie when the client browser is closed??
Many thanks in advance
Green Grape
|
|
|
|
|
Grapes-R-Fun wrote: Even though I have the auth ticket to "NOT" persist
How? That's the first thing I would check. If there is a mechanism that is supposed to result in the browser not caching the cookie and it's not working then the first thing I would suspect is my implementation of the mechanism.
|
|
|
|
|
Mike, I don't know what's causing it to behaive this way... I'm running out of options!
This is my code:
if (_IsAuthenticated)
{
FormsAuthenticationTicket _ticket = new FormsAuthenticationTicket(1,
this.userHandletbx.Text + "_" + DateTime.Now.ToString(),
DateTime.Now,
DateTime.Now.AddMinutes(30),
false,
String.Empty,
FormsAuthentication.FormsCookiePath);
string _encryptedTicket = FormsAuthentication.Encrypt(_ticket);
HttpCookie _authCookie = new HttpCookie(
FormsAuthentication.FormsCookieName,
_encryptedTicket);
_authCookie.Secure = false;
Response.Cookies.Add(_authCookie);
FormsAuthentication.RedirectFromLoginPage(this.userHandletbx.Text, true);
}
And this is my web.config:
<authentication mode="Forms">
<forms loginUrl="Login.aspx"
name=".ASPXFORMSAUTH"
protection="All"
path="/"
timeout="40"
defaultUrl="Home.aspx"
enableCrossAppRedirects="false"
slidingExpiration="true">
</forms>
</authentication>
...and no matter where I stick
FormsAuthentication.SignOut() it doesn't kill that darn cookie!
Am I missing something? Is this a blonde moment I'm having?
Thanks for your help, by the way.
Green Grape
|
|
|
|
|
Grapes-R-Fun wrote: ...and no matter where I stick
FormsAuthentication.SignOut()
it doesn't kill that darn cookie!
Am I missing something?
First two obvious questions are:
1) Is the code executing? The function can't work if it is never being called.
2) Have you followed all the directions of the documentation for the SignOut method?
|
|
|
|
|
Hi,
I have a problem of storing .swf files to SQL Server 2005. Currently my application is storing Image( .bmp, .gif, .png, .jpg, .htm, .html,.png,wmf ) in Binary Field in a table.
I would like to store .swf file in the binary table and retrieve for further processing.
Appreciate if anybody has idea about this.
Thanks in advance.
|
|
|
|
|
AARIFBANGI wrote: Appreciate if anybody has idea about this.
If you are already storing ".bmp, .gif, .png, .jpg, .htm, .html,.png,wmf" then what is the difference between them and .swf?
|
|
|
|
|
I am getting OutofMemory Exception at below code -
newImage = Image.FromFile(value);
Reason: System.Drawing.Image doesn't support the .swf, so the problem is for uploading the flash.
|
|
|
|
|
AARIFBANGI wrote: so the problem is for uploading the flash.
A so nothing at all to do with "a problem of storing .swf files to SQL Server 2005" as you originally stated.
So, why do you want the swf file in the Image if you are just trying to upload it to the SQL Server? Is there something else you are doing with the file that you are not telling us?
|
|
|
|
|
I just want to store swf in SQL Server in binary field. The code snippet
Image newImage = Image.FromFile(Value) is Existing code and that causes the OutOf Memory Exception.
Just pl advice me as how to store .swf in binary field of SQL Server.
There is nothing that I am hiding from you. IT is just storing the .swf and display it in Winform and WebPage.
Thanks for your quick response.
|
|
|
|
|
AARIFBANGI wrote: Just pl advice me as how to store .swf in binary field of SQL Server.
It should be as you are doing just now. However, who ever wrote the code is attempting to load images into an Image object for some reason that seem unrelated to putting the image in the database.
How do you currently put the other image types in the database?
|
|
|
|
|
Hi all , again
I continue with my problem of export excel to sql-server.
I got export sheets of excel to a table of sql-server with this code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
'Path of file in machine of user
Label2.Text = System.IO.Path.GetFullPath(FileUpload1.PostedFile.FileName)
Dim connString As String = _
"Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & "'" & Label2.Text & "';" & _
"Extended Properties = 'Excel 8.0;HDR=Yes'"
Dim cnn As New OleDbConnection(connString)
Try
Dim sql As String = _
"INSERT INTO T_Recibos " & _
"IN ''[ODBC;DRIVER={SQL Server};" & _
"Server=Ip_Server;" & _
"Database=NameDatabase;" & _
"UID=User;" & _
"PWD=password]" & _
"SELECT Id_Comunidad, Id_finca FROM [Hoja1$]"
Dim cmd As New OleDbCommand(sql, cnn)
cnn.Open()
Dim n As Integer = cmd.ExecuteNonQuery()
Label1.Text = "Número de registros afectados: " & n.ToString
Catch ex As OleDbException
Label1.Text = (ex.Errors(0).Message)
Catch ex As Exception
Label1.Text = (ex.Message)
Finally
' Cerramos la conexión
cnn.Close()
cnn = Nothing
End Try
End Sub
End Class
Now my problem is the next, when I try it from my web(not IIS local) and from Sql-Server allocated in my server (not my local Sql-Server) I receive a error that say me that doesn't find the excel file.
I understand why, the problem is that the path only work if the file excel is in the same server that SQL-Server.
A solve will be upload the file excel and later make all but I want to know if is possible with asp.net make it directly from file excel allocate in local machine of user to Sql-Server allocated in a server far of user.
Thanks again by all I am a little desespetare with this
|
|
|
|
|
Hi all,
I have a hyperlink in a Accordion ajax control,now i use this code for finding it:
Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink)
this Error comes: object reference not set to an object
now how i can find my hyperlink ?
Hoda
|
|
|
|
|
|
thank you,
1. Are you using tag for hyperlink or use HyperLink control from toolbox.
--->i used HyperLink control from toolbox.
2. If you are using control from toolbox, What is the ID of HyperLink Control.
--->I changed its ID to hpl.
Hoda
|
|
|
|
|
if you are using hyperlink control, why do you need to find that control. You can access it like:
Me.hpl.NavigateURL = "http://Yahoo.com"
be a part of the solution, rather then problem
|
|
|
|
|
Hi Friends....Please help me...
i successfully uploaded the image...when i replace that image i am not getting(replaced image) new image, i am getting old image when i downloaded.
When i close the website and login ....new image is comming...
so, please any one help me, what is the solution...
thank you,
|
|
|
|
|
I am a newbie at C#. Following code was generated mostly by the tool Visual Web Developer 2005 (with SQL Server 2008 express edition). It actually worked but now neither update nor delete work properly. There is no error message too. The database is very simple with a simple database table called 'Product'.
Any obvious gotchas - I have spent too much time on this already.
Thanks.
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="ProductId" DataSourceID="ObjectDataSource1">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="ProductId" HeaderText="ProductId" InsertVisible="False"
ReadOnly="True" SortExpression="ProductId" />
<asp:BoundField DataField="ProductDescription" HeaderText="ProductDescription" SortExpression="ProductDescription" />
<asp:BoundField DataField="ProductFamilyId" HeaderText="ProductFamilyId" SortExpression="ProductFamilyId" />
<asp:BoundField DataField="UnitPrice" HeaderText="UnitPrice" SortExpression="UnitPrice" />
<asp:BoundField DataField="StartDate" HeaderText="StartDate" SortExpression="StartDate" />
<asp:BoundField DataField="ExpirationDate" HeaderText="ExpirationDate" SortExpression="ExpirationDate" />
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="ServiceDataSetTableAdapters.ProductTableAdapter" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="Original_ProductId" Type="Int32" />
<asp:Parameter Name="Original_ProductDescription" Type="String" />
<asp:Parameter Name="Original_ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="Original_UnitPrice" Type="Decimal" />
<asp:Parameter Name="Original_StartDate" Type="DateTime" />
<asp:Parameter Name="Original_ExpirationDate" Type="DateTime" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProductDescription" Type="String" />
<asp:Parameter Name="ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="StartDate" Type="DateTime" />
<asp:Parameter Name="ExpirationDate" Type="DateTime" />
<asp:Parameter Name="Original_ProductId" Type="Int32" />
<asp:Parameter Name="Original_ProductDescription" Type="String" />
<asp:Parameter Name="Original_ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="Original_UnitPrice" Type="Decimal" />
<asp:Parameter Name="Original_StartDate" Type="DateTime" />
<asp:Parameter Name="Original_ExpirationDate" Type="DateTime" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ProductDescription" Type="String" />
<asp:Parameter Name="ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="StartDate" Type="DateTime" />
<asp:Parameter Name="ExpirationDate" Type="DateTime" />
</InsertParameters>
</asp:ObjectDataSource>
</div>
</form>
</body>
</html>
|
|
|
|
|
try to use SqlDataSource
be a part of the solution, rather then problem
|
|
|
|
|
use sql datasource
when u configur ethe datasource and after u add your query go to advance options and select the update and delete checkboxes
|
|
|
|
|
I'm trying to upload a file in VB.NET using an HtmlInputFile, but everytime I upload, the HtmlInputFile's PostedFile is Nothing.
Here is my ASP.NET code:
<form id="Form1" method="post" runat="server" enctype="multipart/form-data">
<asp:DataGrid id="dgTitles" runat="server" OnUpdateCommand="dgUpdate" DataKeyField="ID">
<Columns>
<asp:TemplateColumn HeaderText="Title" >
<ItemTemplate>
<asp:Label ID="lTitle" Runat="server">
<%# DataBinder.Eval(Container, "DataItem.Title" )%>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="tTitle" Runat="server" text='<%# DataBinder.Eval(Container, "DataItem.Title" )%>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Image">
<EditItemTemplate>
<input id='fuEditImage' type="file" name="fuEditImage" runat="server" enctype="multipart/form-data" />
</EditItemTemplate>
</asp:TemplateColumn>
<asp:EditCommandColumn UpdateText="Update">
</asp:EditCommandColumn>
</Columns>
</asp:DataGrid>
</form>
Here is my VB.NET code:
Sub dgUpdate(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
Try
Dim Title = CType(e.Item.FindControl("tTitle"), TextBox).Text
Dim fuUpload As System.Web.UI.HtmlControls.HtmlInputFile = CType(e.Item.FindControl("fuEditImage"), _
System.Web.UI.HtmlControls.HtmlInputFile)
If Not fuUpload.PostedFile Is Nothing Then 'This always = false
If Not fuUpload.PostedFile.FileName = "" Then
UploadImage(fuUpload)
End If
End If
Catch ex As Exception
'Handle Exception here
End Try
End Sub
When I upload a file, fuUpload is not Nothing, but fuUpload.PostedFile is.
The inputted "Title" text is recognized no problem.
I've also tried with FileUpload object and tag, instead of input tag and HtmlInputFile-- same result.
Can anyone tell me what I'm doing wrong? Why is PostedFile always nothing?
Thanks!
|
|
|
|
|
Hello Friends,
I want to download an image and set as background of my desktop.
|
|
|
|