|
Didn't running aspnet_regiis -i solve your problem?
|
|
|
|
|
Hello ,
I am having a problem in this issue,
I am trying to print a XPS document by passin job name and file path to
PrintQueue.AddJob(jobname,filename,false)
now job is getting queued and printed but the folder where the file is which i am printing is getting locked(i.e I am not able to delete the folder) even if i am deleting the file inside it.
Who am I?
Do you know me....
|
|
|
|
|
Did you try (TaskManager Extension) so see which process has an handle on the folder?
|
|
|
|
|
Hello All,
Is there a way to do this? Or if not is there
a way to force the recyclebin to empty it's self?
Thanks..
is you have code..doesn't matter which language
|
|
|
|
|
Have you tried holding down the Shift key when you hit Delete?
|
|
|
|
|
I think he meant it how to do it programmatically
|
|
|
|
|
Then he better be specific about it. Besides, when my code delete's a file, it doesn't end up in the RecycleBin. That's a function of the Shell, not the file system.
|
|
|
|
|
Dave Kreskowiak wrote: Then he better be specific about it.
This message board is really funny. You can easily get attacked for nothing.
Sorry Dave perhaps next time i will post my questions on a board that's for programming. I really messed up.
Indeed i did mean programatically. At the moment when i delete a file it ends up in the recycle bin. is there a way to empty the recycle bin programatically ?
|
|
|
|
|
How are you deleting the file?? Like I said, the file ending up in the RecycleBin is a function of the Shell, not the file system.
|
|
|
|
|
Ylno wrote: You can easily get attacked for nothing.
Dave wasn't attacking you, just suggesting you be a bit more specific with your question. It happens alot on these forums and if someone isn't being specific enough, they will be called upon about it. Being specific helps narrow the problem down
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
Hi,
As there is limit on number of thread pool threads, is it a good idea to let
remoting object requests come by thread-pool threads? If not, what is the
alternative?
Also on .NET Framework 2.0, ThreadPool thread's default apartmentstate is
MTA. Is it possbile to set Thread-Pool thread's apartmentstate to STA? Is
this possible via remoting configuration? Can you pls give an example or any
link that points to the example?
Does the apartmentstate of .NET thread have any impact on any Native calls?
Or the apartmentstate is just to facilitate COM interop?
If we have COM object that needs to be in STA how to manage the scenario
within MTA of thread-pool thread?
Thank you & Best Regards, Renuka
|
|
|
|
|
hi i want to rebuild my setup file with new changes on my code and have to give it to endusers.
the thing i want is i don want them to uninstall the older one i want to upgrade the installed one.how to do that
with regards
Balagurunathan.B
|
|
|
|
|
You need to make sure that the version number for all of your binaries is higher than the previous version number. If you are using an MSI installer, you also need to change the upgrade code and the product version (I think that's the field name, but I'm not 100% sure...either way, it should be the only version number in the setup project) so that the Windows Installer service recognizes that this is a different version. Keep in mind that MSI only looks at the first 3 portions of the product version when determining if the installer is newer or not.
|
|
|
|
|
Change the version number in the installer properties and VS will remind you to change the product code. Then you might want to flick on the "Remove previous versions" property, to make the upgrade less painful.
|
|
|
|
|
As I browse the forums, I keep finding one problem. Someone posted a fix for .NET framework 2.0 or 3.0 and the people asking only have 1.1. I have two questions:
1: Why do people still use old versions of the framework, especially 1.1?
2: What is the difference between the versions.
Just for the record, I looked on Google, but I came here looking for an explanation in relatively plain English.
|
|
|
|
|
Answer to your first question why people still use version 1.1
There are many reasons for that
1.most of the time people don't want to come out from comfort level with
existing version
2.and majorly for supporting existing project which is in older version
(1.1)
|
|
|
|
|
1. There are many reasons.
Some don't want to use it as it might break stuff, this is a valid reason for a while but they should put the effort in to test stuff.
Some employers are too cheap to upgrade to the new version of Visual Studio. I once knew of an employer so cheap they made the developers use the shareware version of http://www.editplus.com/[^] rather than pay for a proper IDE. As a side note if you ever go for a job interview an they're using an old or unsuitable IDE for no good reason ask your self if it's because the company isn't profitable enough or they don't value the developers.
Some don't want the extra download requirements of the new frameworks. In many countries 20 meg can still be a considerable chunk on dial up internet.
2.
Whats new in .Net 2.0[^]
.Net 3.0 home page[^]
|
|
|
|
|
originSH wrote: Some employers are too cheap to upgrade to the new version of Visual Studio. I once knew of an employer so cheap they made the developers use the shareware version of http://www.editplus.com/[^] rather than pay for a proper IDE.
That is better. At least half a dozen companies in a random sampling of 50 in Chennai can be booked for illegal software. Microsoft and NASSCOM has to do something to 'check' menace.
|
|
|
|
|
Hi,
I'm activating software installations on a network but in a very manual way. First pinging the network for active computers, compare actives computers with an installation list then executing a bat on the computer. I thought it should be easy to automate the process and started reading up on the System.Net.NetworkInformation library but the problem is that I don't know how to extract the computer name from the pingReply object.
It only returns the IP address and since the DNS lookup table isn't up to date I can't use that.
Is there another way to get a computers name from the IP address
|
|
|
|
|
The short answer is "no".
Phil
|
|
|
|
|
the longer answer is Yes .
I had once a similar problem an found that NetWkstaGetInfo [^] worked quite well. You can provide the IP address as input and get the (BIOS-)name of the machine (and other stuff) back.
If I remember correctly I've had had some security issues with workstation configurations (domain worked well). The following c# 2.0 code is all that's needed.
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Globalization;
using NetScan.Contract;
using System.Diagnostics;
namespace NetScan.Service
{
static class NetBios
{
#region public
public class Info
{
private Info()
{
}
internal Info(PlatformId platformId, Version version, string computerName, string lanGroup)
{
this.PlatformId = platformId;
this.Version = version;
this.ComputerName = computerName;
this.LanGroup = lanGroup;
}
public readonly PlatformId PlatformId;
public readonly Version Version;
public readonly string ComputerName;
public readonly string LanGroup;
public string Comment;
public ServerType ServerType;
public override string ToString()
{
return string.Format(CultureInfo.CurrentCulture, "{0} - {1} - {2}", Version, ComputerName, LanGroup);
}
}
public static Info GetInfo(string serverName)
{
Info retVal = null;
System.IntPtr x;
uint lret = NativeMethods.NetWkstaGetInfo(serverName, 100, out x);
if (lret != 0 || x == System.IntPtr.Zero)
{
return null;
}
NativeMethods.WKSTA_INFO_100 wi = (NativeMethods.WKSTA_INFO_100)Marshal.PtrToStructure(x, typeof(NativeMethods.WKSTA_INFO_100));
retVal = new Info((PlatformId)wi.wki100_platform_id, new Version(wi.wki100_ver_major, wi.wki100_ver_minor), Marshal.PtrToStringUni(wi.wki100_computername), Marshal.PtrToStringUni(wi.wki100_langroup));
NativeMethods.NetApiBufferFree(x);
lret = NativeMethods.NetServerGetInfo(serverName, 101, out x);
if (lret == 0 && x != System.IntPtr.Zero)
{
NativeMethods.SERVER_INFO_101 si = (NativeMethods.SERVER_INFO_101)Marshal.PtrToStructure(x, typeof(NativeMethods.SERVER_INFO_101));
retVal.Comment = Marshal.PtrToStringUni(si.sv101_comment);
retVal.ServerType = (ServerType)si.sv101_type;
NativeMethods.NetApiBufferFree(x);
}
return retVal;
}
#endregion
private static class NativeMethods
{
internal enum PlatformId : int
{
PLATFORM_ID_DOS = 300,
PLATFORM_ID_OS2 = 400,
PLATFORM_ID_NT = 500,
PLATFORM_ID_OSF = 600,
PLATFORM_ID_VMS = 700,
}
[Flags]
internal enum SVType : uint
{
SV_TYPE_WORKSTATION = 0x00000001,
SV_TYPE_SERVER = 0x00000002,
SV_TYPE_SQLSERVER = 0x00000004,
SV_TYPE_DOMAIN_CTRL = 0x00000008,
SV_TYPE_DOMAIN_BAKCTRL = 0x00000010,
SV_TYPE_TIME_SOURCE = 0x00000020,
SV_TYPE_AFP = 0x00000040,
SV_TYPE_NOVELL = 0x00000080,
SV_TYPE_DOMAIN_MEMBER = 0x00000100,
SV_TYPE_PRINTQ_SERVER = 0x00000200,
SV_TYPE_DIALIN_SERVER = 0x00000400,
SV_TYPE_XENIX_SERVER = 0x00000800,
SV_TYPE_SERVER_UNIX = SV_TYPE_XENIX_SERVER,
SV_TYPE_NT = 0x00001000,
SV_TYPE_WFW = 0x00002000,
SV_TYPE_SERVER_MFPN = 0x00004000,
SV_TYPE_SERVER_NT = 0x00008000,
SV_TYPE_POTENTIAL_BROWSER = 0x00010000,
SV_TYPE_BACKUP_BROWSER = 0x00020000,
SV_TYPE_MASTER_BROWSER = 0x00040000,
SV_TYPE_DOMAIN_MASTER = 0x00080000,
SV_TYPE_SERVER_OSF = 0x00100000,
SV_TYPE_SERVER_VMS = 0x00200000,
SV_TYPE_WINDOWS = 0x00400000,
SV_TYPE_DFS = 0x00800000,
SV_TYPE_CLUSTER_NT = 0x01000000,
SV_TYPE_TERMINALSERVER = 0x02000000,
SV_TYPE_CLUSTER_VS_NT = 0x04000000,
SV_TYPE_DCE = 0x10000000,
SV_TYPE_ALTERNATE_XPORT = 0x20000000,
SV_TYPE_LOCAL_LIST_ONLY = 0x40000000,
SV_TYPE_DOMAIN_ENUM = 0x80000000,
SV_TYPE_ALL = 0xFFFFFFFF,
}
[StructLayout(LayoutKind.Sequential)]
internal struct WKSTA_INFO_100
{
public PlatformId wki100_platform_id;
public IntPtr wki100_computername;
public IntPtr wki100_langroup;
public int wki100_ver_major;
public int wki100_ver_minor;
}
[StructLayout(LayoutKind.Sequential)]
public struct WKSTA_INFO_101
{
public PlatformId wki101_platform_id;
public IntPtr wki101_computername;
public IntPtr wki101_langroup;
public int wki101_ver_major;
public int wki101_ver_minor;
public IntPtr wki101_lanroot;
}
[StructLayout(LayoutKind.Sequential)]
public struct SERVER_INFO_100
{
public PlatformId sv100_platform_id;
public IntPtr sv100_name;
}
[StructLayout(LayoutKind.Sequential)]
public struct SERVER_INFO_101
{
public PlatformId sv101_platform_id;
public IntPtr sv101_name;
public uint sv101_version_major;
public uint sv101_version_minor;
public SVType sv101_type;
public IntPtr sv101_comment;
}
[DllImport("netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern int NetApiBufferFree(System.IntPtr pBuffer);
[DllImport("netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern uint NetServerGetInfo([MarshalAs(UnmanagedType.LPWStr)] string serverName, int level, out IntPtr Buffer);
[DllImport("netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern uint NetWkstaGetInfo([MarshalAs(UnmanagedType.LPWStr)] string serverName, int level, out IntPtr Buffer);
}
}
}
|
|
|
|
|
ups
just realized that the enums PlatformId and ServerType are defined in another file.
public enum PlatformId
{
Unknown = 0,
DOS = 300,
OS2 = 400,
NT = 500,
OSF = 600,
VMS = 700,
}
[Flags]
public enum ServerType
{
Workstation = 0x00000001,
Server = 0x00000002,
SqlServer = 0x00000004,
DomainController = 0x00000008,
DomainBackupController = 0x00000010,
TimeSource = 0x00000020,
Afp = 0x00000040,
Novell = 0x00000080,
DomainMember = 0x00000100,
PrintQueueServer = 0x00000200,
DialinServer = 0x00000400,
XenixServer = 0x00000800,
ServerUnix = XenixServer,
NT = 0x00001000,
Wfw = 0x00002000,
ServerMFPN = 0x00004000,
ServerNT = 0x00008000,
PotentialBrowser = 0x00010000,
BackupBrowser = 0x00020000,
MasterBrowser = 0x00040000,
DomainMaster = 0x00080000,
ServerOSF = 0x00100000,
ServerVMS = 0x00200000,
Windows = 0x00400000,
DFS = 0x00800000,
ClusterNT = 0x01000000,
TerminalServer = 0x02000000,
ClusterVsNT = 0x04000000,
Dce = 0x10000000,
}
|
|
|
|
|
Hi friends,
How can i switch from http to https and vice versa using c# and .net?
Thanks and Rgds
Nithin
|
|
|
|
|
CP holds articles on that. Search them !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|