I'm trying to access an embedded resource using this method in ASP.Net application but I keep getting this. NullReferenceException: Object reference not set to an instance of an object

Is this the correct way for accessing Embedded resources in asp.net?

private XmlReader GetEmbeddedSchema(string name)
    // get the specified embedded assembly and return an XmlReader for it
    return new XmlTextReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(name));

Related posts

Recent Viewed