Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

avneeshb

@avneeshb
About
Posts
10
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ASP.NET Url problem
    A avneeshb

    This is the message thrown when I try to browse the link using explorer. So, it is the ASP.NET engine that is producing the message. The thing I am not sure about is that is this a 404 error at all? Just to confirm: You are handling 404 errors in IIS by redirecting to your own aspx page in the IIS settings.. is that correct?

    ASP.NET help question csharp asp-net sysadmin

  • ASP.NET Url problem
    A avneeshb

    Thanks Steve- I tried out your solution.. unfortunately with no luck. I went to inetmgr and clicked on properties on the virtual folder. There I changed the 404 settings to a custom page. However, if I still do something like this: http://server/dir/~nested/page.aspx (note the '~'). I still get this error (shown below). It seems like the aspnet engine is trying to process this url and failing. I am trying to find where I can catch this exception. Using global.asax or HTTP modules does not work. However, I have been able to handle a url like this: http://server/dir/nested/~page.aspx using the global.asax Application_Error Stack Trace: [HttpException (0x80070057): Invalid file name for monitoring: 'c:\inetpub\wwwroot\services\~ErrorWS'. File names for monitoring must have absolute paths, and no wildcards.] System.Web.DirectoryMonitor.AddFileMonitor(String file) +429 System.Web.DirectoryMonitor.StartMonitoringFile(String file, FileChangeEventHandler callback, String alias) +76 System.Web.FileChangesMonitor.StartMonitoringPath(String alias, FileChangeEventHandler callback) +495 System.Web.Caching.CacheDependency.Init(Boolean isPublic, Boolean isSensitive, String[] filenamesArg, String[] cachekeysArg, CacheDependency dependency, DateTime utcStart) +1535 System.Web.Caching.CacheDependency..ctor(Boolean isSensitive, String[] filenames, DateTime utcStart) +50 System.Web.Configuration.HttpConfigurationSystem.GetCacheDependencies(Hashtable cachedeps, DateTime utcStart) +144 System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String reqPath, IHttpMapPath configmap) +697 System.Web.HttpContext.GetCompleteConfigRecord(String reqpath, IHttpMapPath configmap) +434 System.Web.HttpContext.GetCompleteConfig() +49 System.Web.HttpContext.GetConfig(String name) +195 System.Web.CustomErrors.GetSettings(HttpContext context, Boolean canThrow) +20 System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow) +39 System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) +486

    ASP.NET help question csharp asp-net sysadmin

  • ASP.NET Url problem
    A avneeshb

    Hi! I am trying to implement custom error redirection for my asp.net pages. Take this example URL: http://server/dir/nested/page.aspx Using custom error redirection settings in web.config (by turning custom error mode to "on"), and writing code in the application_error method in global.asax, I can take care of the following mistyped(maybe intentionally) URL, and take the user to a custom page instead of showing a stack trace. http://server/dir/nested/~page.aspx (Note the '~') The problem is when I try type http://server/dir/~nested/page.aspx. In this case none of my error handlers are triggered. One way of solving this issue is to use IIS filters. My question is whether we can handle this in any other manner (using ASP.NET)? Thanks!

    ASP.NET help question csharp asp-net sysadmin

  • preserving same type information
    A avneeshb

    I guess one solution is to create the proxy using wsdl.exe. The generated proxy class contains the definitions of the Type1 and Type2 objects. If these are removed and the proxy is made to refer to WSAs types, then the example works.

    C# help csharp visual-studio question

  • preserving same type information
    A avneeshb

    Hi! I am having an interesting problem while compiling code across different projects in the same VS.NET solution. Here is the scenario: 1. I have a project (called DataTypes) which defines common classes that I want to use throughout. 2. There is a webservice (WSA) which has a method which accepts two objects: MethodA(DataTypes.Type1 objType1, DataTypes.Type2 objType2) 3. This webservice also calls another webservice (WSB) from MethodA. The method in WSB has the following signature: MethodB(DataTypes.Type1 objType1, DataTypes.Type2 objType2). In the WSA project there is a web reference to WSB (lets call it refB). So this looks like: MethodA(DataTypes.Type1 objType1, DataTypes.Type2 objType2){ objType1.somefield=new_value; refB.MethodB(objType1, objType2); } When the client invokes WSA it passes the objects. MethodA modifies one of the parameters and passes these to WSB. 4. This code gives me a compilation error. The error message is "Cannot convert DataTypes.Type1 to refb.Type1". Understandably, the type information in the generated proxy for WSB refers to its interpretation of what Type1 is. Even though its the same as that in WSA. Any suggestions on how I can solve this problem? Thanks!

    C# help csharp visual-studio question

  • Xml seriliazation query
    A avneeshb

    Thanks! I was actually trying to do this as part of creating a webservice, and apologies for not making this more specific. I have a webmethod which looks something like: MyWebMethod(SubTest sub){ somestuff; } When I create the webservice and look at the soap message that would be sent, I don't see the attribute there (i.e. the string looks like string instead of string . I guess the default xmlserializer does not pick the derived attribute. Is there anyway of informing the serializer in the context of writing a webservice? Thanks!

    C# help database xml question

  • Xml seriliazation query
    A avneeshb

    thats what happens when you don't copy and paste :) In my actual code Subtest extends test so: public class SubTest:Test { public string something; } Thanks!

    C# help database xml question

  • Xml seriliazation query
    A avneeshb

    Hi! I am trying to use XmlSerialization in the following scenario: 1. I have a class called Test: public class Test { private int someAttribute; [XmlAttribute] public int Att { get { return someAttribute; } set { someAttribute=value; } } } 2. And a subclass: public class SubTest { public string something; } Upon serilialization, I get the following: string As can be seen the attribute Att is not visible in the subclass. Using virtual (for the property) and overriding it, or just hiding it with 'new' also did not help. Creating a new attribute with the same name (i.e. marking it as [XmlAttribute("Att")] also creates an error. Any suggestion as to how I can have an attribute of the same name in the subclass also? Thanks!

    C# help database xml question

  • controlling 'min occurs' in WSDL
    A avneeshb

    Hi! I wanted to find out if we can control the 'min occurs' and 'max occurs' values in a the wsdl that is generated automatically when ?WSDL is used. I am wondering if there is some attribute that we could use with the webservice method code itself. Thanks!

    C# wcf question

  • Using CryptAPI with ASP
    A avneeshb

    Hello! I am trying to make the following possible: 1. User accesses Page1.asp and enters some credentials. 2. Page1 posts to Page2.asp which after some things uses a COM component (inproc dll) to do encryption (I have written code for RSA encryption usinf Windows Crypto API) 3. The reponse is the encrypted data. Problem: Everything works fine when client and server are all on the same machine. However when the client accesses Page1 from another machine, the error returned is from the CryptAcquireContext method: Keyset does not exist. What I have tried to do to solve this problem: 1. Created another component (this time a local server, COM exe) which does the encryption work. The dll merely routes the call to the component. This was done to test Inproc vs Outproc issues. 2. Tried to change access permissions in the RSA directory under localsettings\all users etc 3. Used the following to acquire crypt context: if(!::CryptAcquireContext(&hProvider, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, 0)) { if(!::CryptAcquireContext(&hProvider, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_NEWKEYSET)){ ::CryptAcquireContext(&hProvider, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET); } } None of the approaches have worked, and the problem is always failure to get the Crypto Context handle. Any suggestions would be greatly appreciated! Thanks!

    Web Development help visual-studio com sysadmin security
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups