|
i already cheked it ..... it is not read only...but i will try to rebuild it again....tnx.....by z way wat is z difference betwen....release ...and debug....i realy dont know what release do.....
|
|
|
|
|
This generally happens when you make changes to your code when the application is running in debug mode. Since the code has been modified, VS block access to the pdb file and you get a access denied to the .pdb file.
You have the following solutions to this problem
1. As Hariharan had said, do a Rebuild of the solution. This in most cases clears the lock on the pdb file.
2. Locate the pdb file using the windows explorer and delete it and then try build/rebuild from the VS. If you get file is being used error, check if there are any process that are using this file still running using the task manager / process explorer and kill it and re-try.
3. Do a build/rebuild of the solution in "Release" mode and then do a build in "Debug" mode. Not sure if this would work for C# Win Forms, I've done this only on my Web apps.
|
|
|
|
|
I had this same problem with Windows 7 beta, the problem was intermittent and I'm not sure what was causing it. Do you run Visual Studio as administrator?
The problem seems to have been solved since Windows 7 release candidate.
|
|
|
|
|
u can c z solutions to ma problem....& try zem....as zey said..lol
|
|
|
|
|
I have a simple C# exe. It internally has some calls to custom interop. I dont have any problem in executing it manually by either double clicking the exe or thru command prompt, everything works as expected. But the moment i launch it using windows scheduled task it always fails.
Is this a know problem with interop calls, when an executable runs thru scheduled task? it fails at the point where i make a method call on the interop object. BTW i am using W2K.
Any suggestion/solution?
Thanks in advance....
Hariharan.T
|
|
|
|
|
Maybe this is a security issue? Are you using the same user for the scheduled task, as for the manually execution?
Regards
Sebastian
|
|
|
|
|
Thanks for the reply...
i do use the same user, and its part of the administrator group.
Even i added it to few local security policy settings but didnt help. If you are aware of any security policy related to scheduled taks pls share..
Hariharan.T
|
|
|
|
|
Does your app write a log? This could be helpful to get the problem...
|
|
|
|
|
It has a log but doesnt help much, empty exeption
It doesnt fail where i create the actual COM component in the interop instead it fails when i make call using the interop object. FYI the object is valid and not null
Hariharan.T
|
|
|
|
|
What type of exception do you get? Did you took a look in the system event table?
|
|
|
|
|
Event table doesnt have any error neither in Security nor in System. Just found the exception has been suppressed in the log file. i am in the process of rebuilding it to get the exact exception.
Hariharan.T
|
|
|
|
|
Hi All,
Can u help me how to get current user IP Address for my Intranet Site,
I have tried with below codes but its not working when i place my page in
live server....
i)HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]
this is working locally when i place in server its showing default gateway
for that system
ii)Request.ServerVariables["REMOTE_Host"]
could you plz help me to fix my issue.
|
|
|
|
|
Try these
1. Request.Params["REMOTE_ADDR"]
2. Request.UserHostAddress()
3. Request.ServerVariables("HTTP_X_FORWARDED_FOR")
HTTP_X_FORWARDED_FOR would return an list of IP address if the client is accessing the website though a proxy server / gateway server. In such cases use the below code -
ip=Request.ServerVariables("HTTP_X_FORWARDED_FOR") ;
if (!string.IsNullOrEmpty(ip))
{
string[] ipRange = ip.Split(',');
int le = ipRange.Length - 1;
string trueIP = ipRange[le];
}
|
|
|
|
|
Hi,
maybe this[^] will help you.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
Iam using Ajax collapsible panel in my web page page (C# and Asp.NET),
In Master page iam using Script manager instead of using in every page,
If i use script manager in master page the callapsible panel is not working,
and i checked with anathor scenario by removing the master page and placing
the script manager in my page seperately that's working fine,
can u give any soln to fix my issue by using script manager in master page.
|
|
|
|
|
This question you should post in ASP.NET forum.
What is disadvantage of using ScriptManager in content pages?
I Love T-SQL www.aktualiteti.com
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi,
Thanks for your reply,
if i use script manager in my content page's
Ajax Collapsible panel is not working that is the problem,
I tried by removing master page and added script manager seperately in my
page then it's working fine,
Hope this is clear for you!!
|
|
|
|
|
Hi
I have a grid with any number of rows. Each row has a picturebox drawn next to it.
The pictureboxes have context menu's assigned to them (5 menuitems).
Problem is, selecting an item from the contextmenu makes sender the contextmenu, so I don't know which row's picture box was right-clicked.
My code looks like this at the moment.
Declarations:
private ContextMenu[] mnuLamps;
I have a routine which creates the contextmenus's:
mnuLamps = null;
mnuLamps = new ContextMenu[dsSummary.Tables[0].Rows.Count];
for (int i = 0; i < dsSummary.Tables[0].Rows.Count; i++)
{
mnuLamps[i] = new ContextMenu();
mnuLamps[i].MenuItems.Add(new MenuItem());
mnuLamps[i].MenuItems[0].Text = "Receive";
mnuLamps[i].MenuItems[0].Click += new EventHandler(ReceiveSelected);
...
mnuLamps[i].MenuItems.Add(new MenuItem());
mnuLamps[i].MenuItems[4].Text = "Retract";
mnuLamps[i].MenuItems[4].Click += new EventHandler(RetractSelected);
}
When the pictureboxes are added to the form I have:
for (int i = 0; i < dsSummary.Tables[0].Rows.Count; i++)
{
...
picBox[i].ContextMenu = mnuLamps[i];
...
}
I then have ReceiveSelected, RetractSelected etc as:
private void ReceiveSlecetd(object sender, EventArgs e)
sender is of course menuitem, so I don't know which row it was.
I have thought of using
private void ReceiveSelected(object sender, EventArgs e, int TheRow)
and
mnuLamps[i].MenuItems[0].Click += new EventHandler(ReceiveSelected(mnuLamps[i], EventArgs, [i]);
so that I have access to the row, but I am having trouble doing the EventArgs and I am not sure I can use this code fiddling.
Thanks,
Nigel
|
|
|
|
|
Hi,
as you have separate ContextMenu objects for all the PictureBoxes here are two things you could do:
1.
store the PictureBox reference inside the ContextMenu.Tag
the Tag property can hold any object or value you choose, and isn't used by Windows, .NET or GDI; a lot of Controls have a Tag property, when available it is there for your convenience.
2.
Maintain a Dictionary mapping ContextMenu objects to PictureBox objects.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi Experts
How Make Paging of data in Datagridview.in C#.Net.
Dinesh Sharma
Thank U
|
|
|
|
|
Searching the articles before posting may help at times. Look I found something here[^].
|
|
|
|
|
Hi, I created a class library and wrote a function with the try {} catch { throw ;} finally {} manner. However I am not doing anything in the catch block, only throwing the exception. I am handling the exception the UI layer which is using that class library. I want to know the best approach to write the try block. If I use only try {} finally {} without catch block, does it good ?
Pankaj
|
|
|
|
|
Are you even allowed to skip catch? I dont think so.
If the method calling the Class library method handles the exceptions(even for the class library methods), you can avoid try-catch block in the class library method.
|
|
|
|
|
I can not avoid the try catch finally in my class library. Because I am doing file operation in the class library, that's why I have to open and working on the files and in the finally block I am closing the writer/reader/file.
Pankaj
|
|
|
|
|
Hi,
From the C# 2.0 standard:
There are three possible forms of try statements:
• A try block followed by one or more catch blocks.
• A try block followed by a finally block.
• A try block followed by one or more catch blocks followed by a finally block.
Alan.
|
|
|
|