|
there is one main reason for this error which i have faced
when your IIS Server is down VS.Net2005 Framework would automatically add a file called app_offline.htm
Remove this file and then restart your IIS and then try.
there might be some other error which would be coming but since IIS is down and framework doesnot get any response. it adds the page app_offline.htm and start showing instead of the actual error.
Regards,
Satips.
|
|
|
|
|
Thanks for replying Satips but where do I find this app_offline.htm file in order to remove it?
macca
|
|
|
|
|
macca24 wrote: where do I find this app_offline.htm file
In your web application directory
|
|
|
|
|
I know that, but it is not there.
Is there a specific place in the web root directory becasue I cannot see it.
macca
|
|
|
|
|
It will be in the root folder.
Regards,
Satips.
|
|
|
|
|
Hi all,
How can we change the value of a BoundField of Gridview like I have password field in table user_Information and I am storing password in encrypted form. My problem is that when I use following format, the Password field show those password in Encrypted form(i.e. stored in table) but I want to show them in decrypted form. I don't know whether it is possible or not, if yes please let me know. I am using AccessDatasource object to bind the GridView.
Thanks in advance.....
<code>
<asp:GridView ID="GVUser" runat="server" Width="976px" AutoGenerateColumns="False" CellPadding="1" ForeColor="#333333" AllowPaging="True" AllowSorting="True" CellSpacing="1" Font-Names="Arial" Font-Size="9pt" HorizontalAlign="Left" ToolTip='"Rack Master"' OnPageIndexChanging="GVUser_PageIndexChanging" OnSelectedIndexChanging="GVUser_SelectedIndexChanging" OnSorting="GVUser_Sorting" DataKeyNames="User_ID" DataSourceID="AccessDataSource1" >
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:BoundField DataField="User_ID" HeaderText="ID" ReadOnly="True" SortExpression="User_ID" />
<asp:BoundField DataField="User_Name" HeaderText="Name" SortExpression="User_Name" />
<asp:BoundField DataField="Designation" HeaderText="Designation" SortExpression="Designation" />
<asp:BoundField DataField="Fathername" HeaderText="Father's Name" SortExpression="Fathername" />
<asp:BoundField DataField="DOB" HeaderText="D.O.B." SortExpression="DOB" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="False">
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />
<asp:BoundField DataField="Identity_Mark" HeaderText="Identity Mark" SortExpression="Identity_Mark" />
<asp:BoundField DataField="Category" HeaderText="Category" SortExpression="Category" />
<asp:BoundField DataField="User_Password" HeaderText="Password" SortExpression="User_Password" HtmlEncode="False" />
<asp:BoundField DataField="Rights" HeaderText="Rights" SortExpression="Rights" />
<asp:BoundField DataField="bajrang" HeaderText="bajrang" SortExpression="" />
<asp:CommandField ButtonType="Image" SelectImageUrl="~/images/icon-edit.gif" ShowSelectButton="True" />
</Columns>
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" BorderStyle="Ridge" BorderWidth="1px" HorizontalAlign="Center" VerticalAlign="Middle" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<EditRowStyle BackColor="#999999" />
</asp:GridView></code>
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
I'm not sure that I understood correctly, but I suggest using the DataRowBound event of the GridView and replace the values you want.
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
I would convert the boundfield for the password to a template field. something like this:
<asp:TemplateField SortExpression="User_Password">
<ItemTemplate>
<asp:Label ID="lbPassword" runat="server" Text='<%# DecryptPassword(DataBinder.Eval(Container.DataItem,"User_Password")) %>'></asp:Label>
Then make sure your method to DecryptPassword is public so the DataBind can call it.
I haven't actually tried to do this, but I think the code above will work.
Hope that helps.
Ben
|
|
|
|
|
i am building a image gallery in ASP.NET. All images are placed in a specific folder and i want to show the thumb nails of all those image on the web page. Its all working well. Means that my page is displaying the thumb nails of all images that exists in the folder.
The problem arise when i copy the new files in the folder, then the new copied files are not being displayed by thumbs.db file. Thumbs.db file donot update itself when new files are copied in the folder.
how i can solve this problem that when ever i delete or copy images in the folder, the thumbs.db file updates itself???????????????
-<>-shoaib-<>-
|
|
|
|
|
Don't cross post, but to answer your question, I believe you will need to write your own thumbnail generator.
Luckly for you, here's one I already done :-
Create a new Web Form and call it Thumbnail.aspx
Put the following code in the code behind
Partial Class Thumbnail<br />
Inherits System.Web.UI.Page<br />
<br />
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
Try<br />
Dim oImage As System.Drawing.Image<br />
Dim oThumbnail As System.Drawing.Image<br />
Dim sServerPath As String<br />
Dim sFileName As String<br />
Dim iWidth As Int16<br />
Dim iHeight As Int16<br />
<br />
sServerPath = AppPath() & Request.QueryString("p")<br />
sFileName = Request.QueryString("f")<br />
Try<br />
oImage = System.Drawing.Image.FromFile(sFileName)<br />
Catch ex As Exception<br />
oImage = System.Drawing.Image.FromFile(AppPath() & "Images\error.gif")<br />
End Try<br />
<br />
If Request.QueryString("w") = Nothing And Request.QueryString("h") Is Nothing Then<br />
iWidth = oImage.Width<br />
iHeight = oImage.Height<br />
ElseIf Not Request.QueryString("w") Is Nothing And Not Request.QueryString("h") Is Nothing Then<br />
iWidth = Request.QueryString("w")<br />
iHeight = Request.QueryString("h")<br />
ElseIf Not Request.QueryString("w") Is Nothing Then<br />
iWidth = Request.QueryString("w")<br />
iHeight = oImage.Height / (oImage.Width / iWidth)<br />
ElseIf Not Request.QueryString("h") Is Nothing Then<br />
iWidth = oImage.Width / (oImage.Height / iHeight)<br />
End If<br />
<br />
oThumbnail = oImage.GetThumbnailImage(iWidth, iHeight, Nothing, System.IntPtr.Zero)<br />
Response.ContentType = "image/jpeg"<br />
oThumbnail.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg)<br />
oImage.Dispose()<br />
oThumbnail.Dispose()<br />
Catch ex As System.Exception<br />
'Your error handling here<br />
End Try<br />
End Sub<br />
End Class
To use the Thumbnail.aspx simply call into from the webpage you wish the thumbnail to appear like so :-
<img src="Thumbnail.aspx?w=100&f=myimage.jpg">
The w parameter represents the width of the thumbnail, you call also use a h parameter for the height or combine the two. The f parameter is path to the image.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi friends plz help me i want to store any file in database and at the same time if i want that file means i want to dowload
KIRAN
|
|
|
|
|
dear kirankumar,
Are you trying to upload the file into server using fileupload control or
storing the data of the file in the database?
All The Best
Sathesh Pandian
|
|
|
|
|
trying to upload any file(Ex:image,txt,word,etc)
and dowload file using upload control.
KIRAN
|
|
|
|
|
kirankumar@p2softech wrote: dowload file using upload control
|
|
|
|
|
Dear kiran,
you have to read the content of the file and then store the content in sql server and have to maintain the file name and extensions.
When you need to get the file back means you can create the file through the
content then you can send it to the client using response.writefile method
All The Best
Sathesh Pandian
|
|
|
|
|
I tried to setup a web server using IIS 5.1 on my Windows XP but somehow, it's only working on that PC. I know that I should not be using XP as a server on our company but since I will use it only for small transactions, i'd rather give it a try. I installed the old version of Apache 2.0.54 plus modules and it works perfectly... is there any advise from any experts here??? shall i stick to Apache or try IIS + Prayers to make it work? LOL
I'm using ASP.NET
|
|
|
|
|
Do you know Windows XP is built in with a Personal Firewall? Windows Firewall restrict port 80 to be access by the outsiders by default. You have to add a exception to port 80 in the Windows Firewall and try to access from other machines.
Another drawback of using Windows XP as Server is, XP can serve for maximum of 10 connections only. As a result, your Webpage will not open fully (Images may not load) or restricts some connections. Have a nice day... :->
|
|
|
|
|
Thanks Venkatesh for the info. I already added the port 80 to windows firewall but still failed. Regarding the limitations of XP, maybe i need to change my OS to maximize the connection. But is it advisable to use IIS or Apache? what do you think is the best for ASP.NET?
Resty Remigio
CR Developer
Abdul Latif Jameel, Jeddah KSA
|
|
|
|
|
Tethibogz wrote: what do you think is the best for ASP.NET?
IIS.
Regards,
Satips.
|
|
|
|
|
I am a bit of a newbie but I didn't think you could use apache with asp.net? Have i been grossly misinformed?
Cheers
Ian
|
|
|
|
|
Actually you could and it's very easy! but you will have some difficulties in finding the right version of Apache which is (2.0.54). I think this is the only version that have the modules for ASP.NET. you need to install mod_aspdotnet 2.0.0 then a little bit configuring. but let's stick to IIS..
Is there any free domain that host ASP.NET?
|
|
|
|
|
I would believe in Microsoft for the Microsoft products rather believe a third party's open source...
You do understand what I am telling..
|
|
|
|
|
Ok i got your point... It's like this.. use linux and Apache for PHP... LOLS
so now i need to request a new unit with Windows Server 2xxx OS to make it sure that IIS will be working smoothly and a licensed visual studio .net... right now i'm using only the SDK without visual studio.. i've heard that it's easier with vis.studio installed.
Thanks to all!
|
|
|
|
|
hello
i my webform i have 4 date picker.
which are 1. Create date (that is todays date)
2. expirydate (i.e display automatically i write code todays date + 28 days)
3. warning date (i.e also automatically display. expiredate + 2 days)
4.updateDate(which we will select)
all code is correct
but when program run that time runtime error ocurrs.
i.e
The conversion of a char data type to a datetime data type resulted
in an out-of-range datetime value. The statement has been terminated.
In table i am taking datetime datatype.
pls give me a quick solution for this problem.
Gayatri
Gayatri
|
|
|
|
|
Can we see your code please with the line it is failing on. Are you adding 28 days to a datetime object?
Dan
|
|
|
|