|
Check these[^].
If it doesn't help, follow steps below:
Can you access the server?
If No, can't help much.
If yes, check IIS logs file at: "C:\Windows\System32\LogFiles\W3SVC1\"
If there is more than one website hosted on your server, W3SVCNumber will differ.
Also check httperr Log file at: "C:\Windows\System32\LogFiles\".
Find related entries and give details.
..Go Green..
|
|
|
|
|
hi , iam using asp.net 2.0 with sql server 2000
in my site if iam using xp operating system all clients are able to upload the pictures but the clients those who are using windows7 and vista the are getting errors
can you correct my code
<%@ WebHandler Language="C#" Class="right7" %>
using System;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
public class right7 : IHttpHandler {
public void ProcessRequest (HttpContext context)
{
string branchid = "";
if (context.Request.QueryString["branchid"] != null)
branchid = context.Request.QueryString["branchid"];
else
throw new ArgumentException("No parameter specified");
context.Response.ContentType = "image/jpeg";
Stream strm = ShowImage(branchid);
byte[] buffer = new byte[4096];
int byteSeq = strm.Read(buffer, 0, 4096);
while (byteSeq > 0)
{
context.Response.OutputStream.Write(buffer, 0, byteSeq);
byteSeq = strm.Read(buffer, 0, 4096);
}
}
public Stream ShowImage(string branchid)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["transfer"].ConnectionString);
string sql = "SELECT imgright7 FROM tblImages WHERE BranchId = @BranchId";
SqlCommand cmd = new SqlCommand(sql, con);
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@BranchId", branchid);
con.Open();
object img = cmd.ExecuteScalar();
try
{
return new MemoryStream((byte[])img);
}
catch
{
return null;
}
finally
{
con.Close();
}
}
public bool IsReusable {
get {
return false;
}
}
}
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class right7image : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["transfer"].ConnectionString);
string branchid = "";
protected void Page_Load(object sender, EventArgs e)
{
branchid = Session["UserName"].ToString();
if (IsPostBack == false)
{
Image1.ImageUrl = "right7.ashx?BranchId=" + branchid;
Image2.ImageUrl = "right7old.ashx?BranchId=" + branchid;
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("Images.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlCommand cmdptr = new SqlCommand("copyprevimgr7", con);
cmdptr.CommandType = CommandType.StoredProcedure;
con.Open();
cmdptr.Parameters.AddWithValue("@BranchId", branchid);
cmdptr.ExecuteNonQuery();
con.Close();
SqlCommand cmdupdate = new SqlCommand("updateright7", con);
cmdupdate.CommandType = CommandType.StoredProcedure;
con.Open();
cmdupdate.Parameters.AddWithValue("@BranchId", branchid);
if (FileUpload1.HasFile)
{
FileInfo left1info = new FileInfo(FileUpload1.PostedFile.FileName.Trim());
byte[] left1content = new byte[left1info.Length];
FileStream left1stream = left1info.OpenRead();
left1stream.Read(left1content, 0, left1content.Length);
left1stream.Close();
cmdupdate.Parameters.AddWithValue("@imgright7", left1content);
}
cmdupdate.Parameters.AddWithValue("@noter7", TextBox1.Text);
if (cmdupdate.ExecuteNonQuery() != 0)
{
con.Close();
clsdatasettransfer.ShowAlertMessage("Updated.....");
TextBox1.Text = "";
System.Threading.Thread.Sleep(2000);
Image1.ImageUrl = "right7.ashx?BranchId=" + Session["UserName"].ToString();
Image2.ImageUrl = "right7old.ashx?BranchId=" + Session["UserName"].ToString();
}
else
{
clsdatasettransfer.ShowAlertMessage("Updatefailed");
}
}
}
|
|
|
|
|
developerit wrote: clients those who are using windows7 and vista the are getting errors
What error they are getting ?
|
|
|
|
|
|
|
Sandeep Mewara has posted an answer to your question "Popup menu and page redirection using javascript":
KishoreT wrote:
why the data passed along with the links is continuing for other address also, even if the page is not the same?
Though you have not posted the code that parses or forms the navigation URL, it is clear from your issue that you are not re-setting the querystring variable/parameter that to append to your base URL. You keep a URL to navigate and based on the add/edit/delete selection you go ahead and append that value to the base URL. while appending reset the query string parameter. Resetting would remove the old value.
hi sandeep,
sorry while writing the post i made that mistake.
the actual javascript is
window.location.pathname = Page1/Admin/xyz.aspx?action=edit
but in the address bar it was viewed after the page load is
href="http://SiteName/page1/Admin/xyz.aspx?action=add?action=edit
so I get an error that Request["action"] value at server side;
|
|
|
|
|
IIS Requires .Net Framework 3.5
Hi, I installed the VS2008 in my pc. When i open the Manage->IIS services. it doesn't show the 3.5 Framework in the Website's Properties here it show only 2.5 version.
I am using XP operating system. Please Let me know do i need to New version of IIS for 3.5 Framework.
|
|
|
|
|
Ravindra Bisen wrote: t doesn't show the 3.5 Framework in the Website's Properties here it show only 2.5 version.
It should be. There is only upgrades in dll for 3.5 Framework. So if you are getting 2.5.X.X . It's Fine.
just make sure, you IIS is properly registred with ASP.NET Framework. You can have look into aspnet_regiis command for the same.
Please let me know if you any doubts.
Thanks !
|
|
|
|
|
Explain about Boxing and unBoxing
|
|
|
|
|
Homework question? Google it!
..Go Green..
|
|
|
|
|
check the following link
Boxing adnd UnBoxing
regards
koolprasad2003
Rating always..... WELCOME
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
|
Boxing means converting value type variable to reference type variable and unboxing is converting reference type variable to value type variable
ex int i=1;
obj o;
Boxing
int i = o;
Unboxing
o=(obj)i;
Hope this may help u.........
|
|
|
|
|
in c#.net:
i upload a picture with my default .aspx
and then i bound them in gridview
and now i want with mouseover on the file i show the thumnail of picture
|
|
|
|
|
Have you tried this[^]?
..Go Green..
|
|
|
|
|
i want
for example. when you put the mouse over this link www.dsfkjsdlkg.com I want to show a thumbnail image with me near the cursor.
please give me a sample
|
|
|
|
|
This[^] is the 2nd link from the Google search link that I gave you. It shows how to show an image if you hover a hyperlink.
Did you check the links? You will get many others from it which do the same thing.
..Go Green..
|
|
|
|
|
thanks, thats right.
|
|
|
|
|
Glad to help you. You should mark an answer as 'Good Answer' if it answers your question well.
..Go Green..
|
|
|
|
|
do u know sharepoint?
|
|
|
|
|
Hi,
I am trying to clear the items in listbox using .clear method. but this takes too much of time.
currently my listbox contains about 5000 records, but when i try to clear the listbox it takes almost around 1 min.
any workaround for this
Sandeep Kumbhar
|
|
|
|
|
Yes it will take some long time to load & clear in web page. I think list-box with around 5000 items not advisable, you may try auto-complete extender or Gridview(with filter/sorting options load dynamically) so that end user can search data entering starting chars. It's just my suggestion.
|
|
|
|
|
Please try to use javascript , it will take less time.
|
|
|
|
|
Hw abt setting the datasource=null
provided u are using the datasource property for binding the listbox.
|
|
|
|
|
sanjubaba wrote: currently my listbox contains about 5000 records
You can clear the list box just set the datasource as null if you are binding the list from data source.
But, My questions is that why you are binding this amount of Records with your List ? This is seriouly impact performance.
Thanks !
|
|
|
|